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

Quiz Instructions

Select an option to see the correct answer instantly.

1. Which of the following is a list in Python?
2. What is PEP 8 in Python?
3. What is a variable defined inside a function referred to as?
4. What data type is the variable result in the following code?result = 10 + 2.5
5. What will print(2 / 0) output?
6. What will be the output of the following code? "'pythonx = 3y = 4if x > 2 and y < 5:print("Yes")else:print("No") "'
7. The print() function can be used to add numbers only.
8. Select the correct input command below
9. What is the output of the following code? print(type(10))
10. What type of language is Python?
11. What will be the output of the following code? "'pythonif 3 > 2:print("Yes")else:print("No") "'
12. A Python data type that holds positive and negative whole numbers
13. What is the output of the following code? "'pythonx = "Python"print(x[0]) "'
14. Which one is Karel command?
15. What are some popular programming languages mentioned?
16. What happens during the program compilation process?
17. What is the output of the following code?x = 5if x > 3:passelse:print("Hello")
18. What is the purpose of comments in Python?
19. A statement in programming
20. Where was Guido van Rossum born?
21. What does len([1, 2, 3]) return?
22. What does the 'pop()' method do in a list?
23. In Python, ..... does not copy a value; it just attaches a name to the object that contains the data.
24. What is the traditional implementation of Python called?
25. What does the 'continue' statement do in a loop?