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

Quiz Instructions

Select an option to see the correct answer instantly.

1. A syntax error means your code has a 'grammar' mistake or you used symbols/operations incorrectly
2. Which of the following is the correct way to define a function in Python?
3. A price such as 3.65 pesos should be saved as what kind of variable?
4. What is the result of 3**2
5. What does casting do?
6. Describe the structure of an if-elif-else statement.
7. What is the output of the following code? "'pythoncount = 0while count < 3:print(count) count += 1 "'
8. Karel can't
9. Fill in the blank:The Integer, Floating-Point, and String Data Types are introduced in .....
10. What is the meaning of the arithmetic operator '%' in programming?
11. An element of a programme which stores a value that can change as the programme is run
12. The smallest individual unit in a program is called as
13. Python code runs .....
14. What is the function of the 'else' statement in selection constructs?
15. What is the effect of the following import statement?from math import *
16. Which of the following is NOT a legal variable name
17. How do you ask an input from a user?
18. What will be the output of the following code? "'pythonx = input("Enter a number: ")print(type(x)) "'
19. What is the purpose of f-strings in Python?
20. Comments in Python program are ..... by interpreter
21. What is the output of the following Python code? print("Hello, world!")
22. What will be the output of print(bool([]))?
23. What will be the output?name = "Dave"print (name)
24. What does "assignment" mean in Python?
25. Which of the following is a correct 'for' loop in Python?