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

Quiz Instructions

Select an option to see the correct answer instantly.

1. Why do certain words change color in Python?
2. Text to be output to the screen should be enclosed by '' ''
3. Str="world of python programming"print(str[::-2])
4. The following code will stop the loop if i is 3 Fill in the blanks to perform the same i = 1 ..... i < 6:if i == 3:break i += 1
5. What will be the data type of num1 if the following code is executed?num1=int('3.14')
6. Find the argument in the following code:hero.moveUp(4)
7. Which version of Python introduced list comprehensions?
8. ..... is a data type that can represent one of two values either True or False such as 1, 0, 2 > 1, 3 < 2.
9. Which statement will check to see if a is equal to b?
10. What is the output of the code?a = (33, 55)a.append(22)print(a)
11. Who created Python programming language?
12. Which one of the following has the highest precedence in the expression?
13. What is concatenation?
14. What keyword do you use to start a function?
15. What type of inheritance is illustrated in the following piece of code?class A():passclass B():passclass C(A, B):pass
16. The Python keywords/commands "break" and "continue" can be used in other structures (such as IF statements) as well as in loops.
17. Which of the following symbols is used in Python to mean "Less than or equal to" ?
18. If a function doesn't have a return statement, which of the following does the function return?
19. A variable that is defined inside a method and belongs only to the current instance of a class is known as?
20. Why is it difficult to find pythons in the Florida swamps?
21. Leo wants to create a subroutine that will roll a dice. Which syntax is correct?
22. Which one of the following have the highest precedence in the expression?
23. Which operator checks if a value is not equal to another value?
24. Else if (elif) is used in which situation?
25. What is the output of the following code?var1 = 1var2 = 2var3 = "3"print(var + var2 + var3)