[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

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

3 / 40

3.

 ____________________ can be defined as a named group of instructions that accomplish a specific task when it is invoked/called.

a. Function

b. Datatype

c. Token

d. Operator

4 / 40

4. To write and execute code in python, we first need to install Python on our system

5 / 40

5. Who developed Python Programming Language?

6 / 40

6. Pascal Case
Each word starts with a capital letter:

7 / 40

7. The length of an array is always one more than the highest array index.

8 / 40

8. Python has various versions available

9 / 40

9. You can also have an else without the elif

10 / 40

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

11 / 40

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

12 / 40

12.

What do we use to define a block of code in Python language?

  1. Key
  2. Brackets
  3. Indentation
  4. None of these

13 / 40

13.

What is the value of the expression 100 / 25?

  1. 4
  2. 4.0
  3. 0
  4. 25

14 / 40

14. Which of the following loop is not supported by the python programming language?

a) for loop

b) while loop

c) do…while loop

d) None of the above

15 / 40

15.

Function defined to achieve some task as per the programmer’s requirement is called a ___________

a. user defined function

b. library function

c. built in functions

d. All of the above.

16 / 40

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

17 / 40

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

18 / 40

18. An array can hold many values under a single name

19 / 40

19.

Python considered the character enclosed in triple quotes as String.(T/F)

a. True

b. False

20 / 40

20. With the break statement we can stop the loop even if the while condition is true

21 / 40

21. With the break statement we can stop the loop before it has looped through all the items

22 / 40

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

23 / 40

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

24 / 40

24. Comparison operators are not  used to compare two values

25 / 40

25. print() function is often used to output variables.

26 / 40

26. if statements cannot be empty, but if you for some reason have an if statement with no content, put in the pass statement to avoid getting an error

27 / 40

27. Python can be used to handle big data and perform complex mathematics.

28 / 40

28. Is Python code compiled or interpreted?
a) Python code is both compiled and interpreted
b) Python code is neither compiled nor interpreted
c) Python code is only compiled
d) Python code is only interpreted

29 / 40

29. Python has syntax that allows developers to write programs with fewer lines than some other programming languages.

30 / 40

30. The else keyword catches anything which isn’t caught by the preceding conditions.

31 / 40

31.

 What is output of: 35 == 35.0

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

32 / 40

32.

What will be the output of below Python code?

tupl=([2,3],"abc",0,9)tupl[0][1]=1print(tupl)A. ([2,3],"abc",0,9)B. ([1,3],"abc",0,9)C. ([2,1],"abc",0,9)D. Error

33 / 40

33. Can we write if/else into one line in python?

a) Yes
b) No
c) if/else not used in python
d) None of the above

34 / 40

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

35 / 40

35. What keyword would you use to add an alternative condition to an if statement?

a) else if
b) elseif
c) elif
d) None of the above

36 / 40

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

37 / 40

37. Comments starts with a #

38 / 40

38.

What will be the output of above Python code?

str1="6/4"print("str1")

A. 1
B. 6/4
C. 1.5
D. str1

39 / 40

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

a) for

b) while

c) Both (a) and (b)

d) None of the above

40 / 40

40.

Which is the correct operator for power(xy)?

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

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.