Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 33 (25 MCQs)

Quiz Instructions

Select an option to see the correct answer instantly.

1. Which of the following is an acceptable variable name?
2. What would be the output of the following code:for i in range(3):print(5)
3. What is the syntax of a for loop in Python?
4. All keyword in python are in
5. In order to move the turtle 120 forward without drawing on the screen, which order is correct?
6. What method is used to add an element to the end of a list in Python?
7. Which of the following does not work in Lists?
8. What can a variable not start with?
9. In order to store values in terms of key and value we use what core data type.
10. In the following code, what type of variable is being created?foo = 3.5
11. What is the output of the following range() function?for num in range(2, -5, -1):print(num, end=", ")
12. 4 is 100 in binary and 11 is 1011. What is the output of the following bitwise operators? a = 4b = 11print(a | b)print(a >> 2)
13. Is the following piece of code valid?>>> a=(1, 2, 3, 4)>>> del a
14. What kind of expression must be used as part of the "while" loop statement?
15. What Python command is used to output text to the screen?
16. What data value would store the value:9?
17. Python uses ..... to define program blocks.
18. What will the output be from the following code?print(9/3*2+4-5)
19. A variable is a named value that can be changed in the program.
20. What computer science concept stores information to be used later?
21. This statement is used to evaluate only one condition
22. What is the output of the following piece of code?class Test:def ..... init ..... (self):self.x = 0class Derived ..... Test(Test):def ..... init ..... (self):Test ..... init ..... (self) self.y = 1def main():b = Derived ..... Test() print(b.x, b.y)main()
23. What type of loop do you use to loop through a list?
24. We need import turtle at the top of the code to use Python turtle?
25. What is the output of the followingaList = [5, 10, 15, 25]print(aList[::-2])