[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1. The format() method takes unlimited number of arguments

2 / 40

2. You can use the pop() method to remove an element from the array

3 / 40

3. Variables that are created outside of a function

4 / 40

4. Python allows you to extract the values into variables.

5 / 40

5. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

6 / 40

6. Comments can be used to make the code more readable.

7 / 40

7. Which of the following is the correct extension of the Python file?

8 / 40

8. You have to use the same number of spaces in the same block of code, otherwise Python will give you an error

9 / 40

9. The format() method takes the passed arguments

10 / 40

10. Python will give you an error if you skip the indentation

11 / 40

11. + operator is used  to get output of multiple variables

12 / 40

12.

def cal(n1) : What is n1?

a. Parameter

b. Argument

c. Keyword

d. None of the above

13 / 40

13. Python can be used on a server to create web applications?

14 / 40

14. You can have if statements inside if statements, this is called nested if statements.

15 / 40

15.

Which of the following creates a tuple?

A. tuple1=(“a”,”b”)
B. tuple1[2]=(“a”,”b”)
C. tuple1=(5)*2
D. None of the above

16 / 40

16. What is the output of the given below program?

if 1 + 3 == 7:    print("Hello")else:    print("Know Program")

a) Hello
b) Know Program
c) Compiled Successfully, No Output.
d) Error

17 / 40

17. Snake Case
Each word is separated by an underscore character:

18 / 40

18. Which keyword is used for function?
a) Fun
b) Define
c) Def
d) Function

19 / 40

19. break in Python is used ______________

a) To restart a loop

b) Terminate a loop

c) To jump in between the loop

d) None of the above

20 / 40

20.

 What is output of: 35 == 35.0

  1. False
  2. True
  3. 33
  4. None of the above

21 / 40

21. Which of the following character is used to give single-line comments in Python?
a) //
b) #
c) !
d) /*

22 / 40

22. Python can be treated in a procedural way, an object-oriented way or a functional way.

23 / 40

23. What will be the output of the following Python code?

x = ['ab', 'cd']for i in x:    i.upper()print(x)

a) [‘ab’, ‘cd’]
b) [‘AB’, ‘CD’]
c) [None, None]
d) none of the mentioned

24 / 40

24.  ________ in Python is a counter-controlled loop.

a) for

b) while

c) Both (a) and (b)

d) None of the above

25 / 40

25.

Which function overloads the >> operator?

  1. more()
  2. gt()
  3. ge()
  4. None of the above

26 / 40

26.

Which is the correct operator for power(xy)?

  1. X^y
  2. X**y
  3. X^^y
  4. None of the mentioned

27 / 40

27. A variable name cannot start with a number

28 / 40

28.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

29 / 40

29.

In Python, a variable may be assigned a value of one type, and then later assigned a value of a different type:

  1. False
  2. True

30 / 40

30. What is the output of the given below program?

if 3 + 4 == 7:    print("Hi")else:    print("Know Program")print("Hello")

a) Hi
b) Know Program

c)
Hi
Hello

d)
Know Program
Hello

31 / 40

31.

The function can be called in the program by writing function name followed by ____

a. [ ]

b. { }

c. ( )

d. None of the above

32 / 40

32. Most recent major version of Python is Python 3

33 / 40

33. Find the output of the given Python program?

a = 25if a < 15:    print("Hi")if a <= 30:    print("Hello")else:    print("Know Program")

a) Hi
b) Hello
c) Know Program
d) Compiled Successfully, No Output.

34 / 40

34. Pip is  not a powerful package management system for Python software packages

35 / 40

35. Camel Case
Each word, except the first, starts with a capital letter:

36 / 40

36. Indentation refers to the spaces at the beginning of a code line.

37 / 40

37.

What is the data type of print(type(10))

38 / 40

38. You can also use the remove() method to remove an element from the array

39 / 40

39. Find the output of the given Python program?

a, b, c = 1, 3, 5if a > 0:  if b < 2:    print("Hi")  elif c > 3:    print("Hello")else:  print("Know Program")

a) Hi
b) Hello
c) Know Program
d) Compiled Successfully, No Output.

40 / 40

40. You can use the append() method to add an element to an array

Exit



[hurrytimer id=”2250″]
[wooct_product]

Wrong shortcode initialized


You must log in to see your results.



Wrong shortcode initialized


There are no questions atteched yet.





[ays_quiz_leaderboard id=”Your_Quiz_ID” from=”Y-m-d H:i:sa” to=”Y-m-d H:i:s”]

Category:


Wrong shortcode initialized


[WATU 1]

You must log in to see your results.