Class 11 Computer Science Chapter 2 Introduction To Python Quiz 55 (25 MCQs)

Quiz Instructions

Select an option to see the correct answer instantly.

1. Which of the following is the correct way to get user input and store it in a variable called 'city'?
2. What are sequence commands?
3. What is printed by the following statement?print("P" not in "APCSP")
4. Which of the following is a built-in data type in Python?
5. Which is most appropriate statement to refer to Dynamic Typing.
6. What is Script mode?
7. Which of the following is the correct way to declare a variable called 'height' and assign it the value 1.75 (in metres) in Python?
8. A Python program requires ..... to be executed.
9. What is the correct way to start a Python program?
10. What will:print(10 // 3) show?
11. This is when you convert a variable value from one type to another.
12. What is the purpose of the assignment statement in programming?
13. How do you access elements in a Pandas Series?
14. What will be the output of print(5 + 3 * 2)?
15. Code repeated / looped until a condition has been met or a set number of times.
16. Is the result of the code:print ("Hello World)
17. What is the output of the following code? "'pythontry:print(10 / 0)except ZeroDivisionError:print("Cannot divide by zero!") "'
18. Which statement correctly assigns "Sophie" to the variable name?
19. A ..... function is a process in which a function calls itself directly or indirectly.
20. What should you do before running a Python program?
21. What will be the output of the following code?my ..... list = [1, 2, 3, 4, 5]print(my ..... list[2:4])
22. A Microsoft word document is saved with the extension .doc (e.g. My project.doc). What extension is used when saving python programs?
23. What is the purpose of output formatting in Python?
24. Which value is a Boolean data type?
25. Which operator type is used in the expression var ..... 1 > var ..... 2?