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

Quiz Instructions

Select an option to see the correct answer instantly.

1. Used to make comments
2. What does the following code do? "'pythonfor i in range(3):print(i) "'
3. What will be the output of the following code:print(5 == 5)?
4. Which construct lets Python choose among more than two paths?
5. What will be the output of the following code? "'pythonnumbers = [10, 20, 30]print(numbers[1]) "'
6. Which programming language uses loops?
7. A compiler is a software program that:
8. What is a Constant?
9. What is the result of the expression 9 * 3 in Python?
10. Who designed Python?
11. Which symbol is used to start a comment in Python?
12. Which of the following statements will correctly check if a variable 'a' is equal to 10?
13. What is the purpose of the IDLE interpreter in Python?
14. What do we use variables for?
15. Which of the following is a float in Python?
16. What is the purpose of the 'elif' statement in Python?
17. Which statement shows understanding of why tuples are handy in programs?
18. What are keywords in Python? Give an example.
19. Is the result of the following code:print(random.randint(3, 9))
20. Which of the following is NOT an example of a high-level programming language?
21. What file extension should you use to save a Python script in IDLE?
22. Which of the following is used to create a function in Python?
23. What will be the output of the following code? "'pythonname = input("Enter your name: ")print("Welcome, '' + name) "'If the user enters 'Alice', what is printed?
24. What is the purpose of the task:first = user INPUT(), last = user INPUT(), OUTPUT:first + last?
25. Which function adds a counter to a list when used in a for loop?