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

Quiz Instructions

Select an option to see the correct answer instantly.

1. Which one is NOT a legal variable name?
2. What is the output of the following code snippet? "'pythonx = 5y = 10print(x + y) "'
3. What will be the output of the following code? print("The length is", 5, "metres")
4. Which of the following is an immutable data type?
5. What is the output of the following code? 'print("The result is '' + str(5 + 3))'
6. Who is the creator of the Python programming language?
7. 42 is an example of what data type?
8. What is wrong with the following function?def add (x, y):return x + zprint (add (3, 4) )
9. What will the following code print? "'pythonx = 10if x > 5:print("Greater")else:print("Smaller") "'
10. What will be the output of the following code?x = 10if x > 5:print("x is greater than 5")else:print("x is 5 or less")
11. What is the output of the following python code:tup1=(10, 20, 40, 60, 70)print(tup1[4:2])
12. What kind of program does Python need?
13. Which operator is used to reverse the logical state of its operand?
14. Which statement best describes tuple immutability?
15. Which of the following is not in Python Character Set?
16. To add an item to the end of a list we can use which method?
17. Which of the following is a valid Python identifier?
18. What does the 'round' subprogram in PLS do?
19. How can you read a file in Python?
20. What is the name of this program?
21. What will be the output of the following code? "'pythonx = 5y = 10print(x + y) "'
22. What does this function do? input()
23. What is operator precedence and how does it affect expressions in Python?
24. You have a tuple temperatures = (12, 18, 5, 20). Which call finds the smallest temperature?
25. What is the command to create a DataFrame from a list of dictionaries?