Class 11 Computer Science Chapter 2 Introduction To Python Quiz 7 (60 MCQs)

Quiz Instructions

Select an option to see the correct answer instantly.

1. A = 5a = 83print(a)When this program is executed, what will be displayed on the screen?
2. Which of the following variable names is NOT valid in Python?
3. Which operator is used for 'not equal'?
4. What will be the output of the following code? "'pythonlength = 5width = 2print(length * width, "metres") "'
5. What data type is used for text in Python?
6. What is the output of the following code:print('Hello, World!')?
7. Which of the following statements will print the value of variable 'weight' in pounds?
8. Which of the following is NOT a valid Python variable name?
9. Is the type of errors that happens when the computer is not able to make the conversion reliably
10. What are the main features of Python?
11. What will the following recursive function return?def sum ..... range(n):if n <= 0:return 0return n + sum ..... range(n-1)print(sum ..... range(5))
12. What is the purpose of a syntax error in Python?
13. All computer programs must be written in the python shell.
14. Python supports dynamic typing.
15. What data type is a in this code:a = "5"
16. What operator would I need to add 5 and 10?
17. ..... are reserved words.
18. To repeat until a particular condition is true use:
19. What will the following code output? 'print("5 + 3 =", 5 + 3)'
20. Which of the following is the correct syntax for a while loop in Python?
21. The Raspberry Pi devices used in this course use which operating system (O/S)?
22. What will happen if you run this code print('red is my favourite colour") (a)
23. What is the result of the expression 'Hello' + ' World'?
24. Which statement correctly assigns the string "Tanner" to the variable name?
25. Which of the following is a valid integer in Python?
26. What is one reason for Python's huge community support?
27. Which of the following is a key design feature of Python that enforces code structure?
28. What will be the result of the following import statement?from math import *
29. How do you add the value '9' to the end of a list called 'numbers'?
30. What does the 'append()' method do in a list?
31. What will be the output of the following code?total = 0for i in range(1, 4):total += iprint(total)
32. Which Python keyword is used to handle an alternative condition that should be checked only if the initial if statement is false?
33. What is the correct way to output "Hello, World!" in Python?
34. What does a cross platform language mean?
35. Apa tujuan dari pernyataan 'if' dalam Python?
36. What is the first step to save a Python program?
37. Full form of IDLE
38. Which subprogram is used to set the color of the pen in the turtle library?
39. Which arithmetic operator is used to calculate the remainder (or modulus) after division?
40. What is the output of this code? print("Hello", "World")
41. What is the big question in computer science?
42. Python has a simple syntax similar to the
43. Comments help the programmer make ..... within the program without affecting the code.
44. Which common error occurs when you forget a colon (:) after an if statement, for loop, or function definition?
45. What will be the output of the following code? "'pythonfruits = ['apple', 'banana', 'cherry']print(fruits[-1]) "'
46. The instructions in a program, when expressed in Python, .....
47. What does the return statement without any arguments return?
48. What are the three main programming structures?
49. Explain the concept of tuple assignment in Python with an example.
50. Complete the code:x= ..... (input("The first integer")
51. In age = 13, what is the value?
52. What is the official form for the for loop in Python?
53. 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)
54. In what year was Python released?
55. What is the output of the following code? "'pythonprint("Hello World"[6:11]) "'
56. You have animals = ("cat", "dog", "cat", "bird", "cat"). What is animals.count("cat")?
57. Every flowchart has .....
58. What will be the output of the following code?x, y, z = 1, 2, 3print (x + y + z)
59. How do you import the Turtle module in Python?
60. Which arithmetic operator is used for exponentiation?