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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What is the output of this code? print("Hello", "World")
2. What is the big question in computer science?
3. Python has a simple syntax similar to the
4. Comments help the programmer make ..... within the program without affecting the code.
5. Which common error occurs when you forget a colon (:) after an if statement, for loop, or function definition?
6. What will be the output of the following code? "'pythonfruits = ['apple', 'banana', 'cherry']print(fruits[-1]) "'
7. The instructions in a program, when expressed in Python, .....
8. What does the return statement without any arguments return?
9. What are the three main programming structures?
10. Explain the concept of tuple assignment in Python with an example.
11. Complete the code:x= ..... (input("The first integer")
12. In age = 13, what is the value?
13. What is the official form for the for loop in Python?
14. What's the value of the below code snippet?a, b, c = 1, 2, 3a, b, c = c, a, b = b, a, c = c, b, aprint(a, b, c)
15. In what year was Python released?
16. What is the output of the following code? "'pythonprint("Hello World"[6:11]) "'
17. You have animals = ("cat", "dog", "cat", "bird", "cat"). What is animals.count("cat")?
18. Every flowchart has .....
19. What will be the output of the following code?x, y, z = 1, 2, 3print (x + y + z)
20. How do you import the Turtle module in Python?
21. Which arithmetic operator is used for exponentiation?
22. What is the output of the following code when coin is 0?from random import randintcoin = randint(0, 1)if coin == 0:result = "heads" print(result)else:result = "tails"
23. What kind of statements does Python use in its code lines?
24. If you want more than one option for your code, what do you use (after if)?
25. Which of the following statements is true about Python?