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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What is a variable defined outside a function referred to as?
2. Str="world of python programming"print(str[0:5])
3. In python the ' BOOLEAN data type' can be defined as ..... ?
4. Any statements inside an IF clause (section) can be executed multiple times.
5. Repeat a block of code while a certain condition is true (they do not go on forever).
6. If foo is equal to 'bar', what is the value of foo after this operation?foo += 3
7. Which of the following allow to name the various parts of a multi-item object?
8. ..... data type represent one of two values either True or False such as 1, 0, 2 > 1, 3 < 2.
9. What is the output of the following code:print 5//2
10. In Python, a variable needs to
11. What is displayed on the screen when the following code runs? esports = ["Donkey Kong", "Galaga", "Pac Man"] if ("Galaga" in esports):print("Found it") else:print("Not here")
12. What data type represents characters?
13. Which of the following assign the value 50 to a variable x?
14. What are the lines of code called in a program?
15. Which of the following statements is correct for variable names in Python language?
16. What will be the output from the following code?print(17%5)
17. If list=[17, 23, 41, 10] then list.append(32) will result
18. Dictionary keys must be .....
19. List items are indexed, the first item has index [1], the second item has index [2] etc.
20. A sequence of immutable objects is called
21. What is the maximum possible length of an identifier?
22. Which of these commands would successfully create a turtle named Alice
23. When you compare two values, the expression is evaluated and Python returns the Boolean answer.
24. What can we use to get the characters from index 2 to index 4 (llo) in txt = "Hello, World"
25. When we create a program to extract each alphabet from a given string, what is it known as?