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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What will the following code output? "'pythontemperature = 20if temperature > 25:print("It's hot")else:print("It's cool") "'
2. Which of the following is a correct if statement in Python?
3. What will happen if you call a function with fewer arguments than required, but no default values are provided?
4. Which of the following is a correct way to assign strings with multiple lines in a variable?
5. Write the output of the following code:x=2; y=3; x+y+5; print(x+y)
6. What is keyword?
7. Which of the following is a valid way to create a tuple in Python?
8. Which one is a Python keyword?
9. Describe the use of the 'continue' statement in a loop.
10. How is Jython different from CPython?
11. Your program asks people how much money something costs and saves it as a variable named "price" . Assuming users enter the amount correctly, which command will result in the value containing dollars AND cents.
12. What's the output of the below code snippet?from math import sqrtL1 = [x**2 for x in range(10)].pop()L1 += 19print(sqrt(L1), end = '' ")L1 = [x**2 for x in reversed(range(10))].pop()L1 += 16print(int(sqrt(L1)))
13. Apa output dari print(2 ** 3)?
14. Code forb is greater than a
15. What is the data type of x after the following statement?x = [7, 8, 9, 10]
16. What is the default mode for the PLS turtle when it is created?
17. Which function gives the length of a list?
18. What is the syntax used to ask something in Python?
19. Which of the following statements will display the value stored in the variable 'height'?
20. What is the correct rule for naming variables in Python?
21. Each line or instruction typed is interpreted and executed immediately and results are displayed each time you press ENTER.
22. Python is widely used in which specialized field due to its powerful libraries like Pandas and NumPy?
23. What is the output of the code:d1 = \{"john":40, "peter":45\} d2 = \{"john":466, "peter":45\} print d1 > d2
24. Which of these is a Python keyword?
25. Python uses ..... to convert its instructions into machine language.