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

Quiz Instructions

Select an option to see the correct answer instantly.

1. Which of these pieces of code would return the name "Harry" from the following list?nameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"]
2. What does an if statement do?
3. An ordered set of instructions to be executed by a computer to carry out a specific task is called .....
4. Which statement about variable naming is correct?
5. How do you close the file?
6. Explain the concept of operator precedence in Python.
7. What will be the output of the following code? "'pythonname = "Sam"print("Hello, '' + name) "'
8. Which of the following function can be used to find the data type of a variable?
9. How do you import a module in Python?
10. Which of the following is a high-level programming language?
11. Which string subprogram is used to replace all occurrences of a certain string within another string?
12. What will be the data type of x after the following statement if input entered is 18? x = input('Enter a number:')
13. What is the correct syntax for assigning the value 10 to a variable named x in Python?
14. Python programming use COMPILER to translate the source code
15. Which symbol represents multiplication?
16. Which of the following is a valid variable name?
17. Which of the following is the correct syntax for a for loop in Python?
18. What is a commenting line?
19. What will be the output of the following code?x = 2y = 3print(x)x = x + yprint(x)
20. In programming, a (n) ..... is a value that can change, depending on conditions or on information passed to the program
21. What is the output for ' ' in 'python'?
22. Both the print statement will return same output (T/F)
23. What does PLS use for the conversion between data types?
24. Which of the following is the correct way to write a multi-line comment in Python?
25. What is the first step to start a new program in Python?