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

Quiz Instructions

Select an option to see the correct answer instantly.

1. Comments in Python are written with a special character, which one?
2. What is a computer program?
3. What will the following code print? "'pythonfor i in range(3):print("Python") "'
4. What button do you press to compile (run) your program so that it runs in the shell?
5. X=3x+1print(x)
6. What is the output of the given Python code:print("ab", "cd", "ef", sep='*')
7. Which symbol stands for divide?
8. A = 5a = 83print(a)When this program is executed, what will be displayed on the screen?
9. Which of the following variable names is NOT valid in Python?
10. Which operator is used for 'not equal'?
11. What will be the output of the following code? "'pythonlength = 5width = 2print(length * width, "metres") "'
12. What data type is used for text in Python?
13. Which of the following is NOT a valid variable name in Python?
14. What is the output of the following code:print('Hello, World!')?
15. Which of the following statements will print the value of variable 'weight' in pounds?
16. Which of the following is NOT a valid Python variable name?
17. Is the type of errors that happens when the computer is not able to make the conversion reliably
18. What are the main features of Python?
19. What will the following recursive function return?def sum ..... range(n):if n <= 0:return 0return n + sum ..... range(n-1)print(sum ..... range(5))
20. What is the purpose of a syntax error in Python?
21. All computer programs must be written in the python shell.
22. Python supports dynamic typing.
23. What data type is a in this code:a = "5"
24. Which data type is used to represent whole numbers in Python?
25. What operator would I need to add 5 and 10?