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

Quiz Instructions

Select an option to see the correct answer instantly.

1. Which line of code will display the message 'Hello World!' on the screen when it is run in Python?
2. Which keyword is used for decision making?
3. How do you take input from the user?
4. A disadvantage of Python is it is harder to debug than other higher level programming languages.
5. Which operator checks if two values are not equal in Python?
6. What are python comments?
7. What is the name of the programming language we are learning?
8. What is the output of the expression 8 * 2 in Python?
9. Which of the following is NOT a type of variable in Python?
10. Tuples in Python have a limited set of methods. Which statement is accurate?
11. Which of the following is a correct way to start a comment in Python?
12. Why Python is in demand?
13. Which of the following is NOT a built-in data type in Python?
14. What is printed by the following statement?print("A" in "APCSP")
15. What will be the output of the following code?my ..... dict = \{'name':'Alice', 'age':25\}print(my ..... dict['name'])
16. What is string concatenation used for?
17. What data type is 12.0?
18. The instructions in a program .....
19. What is the output of the following code?name = input("Enter your name: ")print("Hello, '' + name + "!")(Assume the user enters "Alice")
20. What is the correct way to declare a variable in Python?
21. Which is NOT a legal variable name?
22. Why is else placed at the end of an if-elif-else chain?
23. You receive data as a list:data = [9, 2, 9]. Which single call turns it into an immutable sequence?
24. A line of text that Python won't try to run as code
25. What is Python commonly used for in AI?