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

Quiz Instructions

Select an option to see the correct answer instantly.

1. Exponent operator ** has (a) associativity in Python.
2. What does built-in function type do in context of classes?
3. Logical operators:True if both operands are true
4. What is the output of the following code?def calculate (num1, num2=4):res = num1 * num2print(res)calculate(5, 6)
5. S1="Hello"n1=10print(s1+n1)What is the error in this code?
6. Which of the following is a feature of Python DocString?
7. Suppose you have the following tuple definition:t = ('foo', 'bar', 'baz')Which of the following statements replaces the second element ('bar') with the string 'qux':
8. What syntax would you use to create a name variable?
9. Which of the following is true about if-elif-else statements?
10. Random.randrange(6)
11. Comparison Operators:Select the correct operator for Greater than or Equal to:
12. Fixing errors in programming is called .....
13. Which word completes this sentence: "Iteration makes code more ..... "
14. Which one of the following is correct way of declaring and initializing a variable, x with value 5?
15. What key word is does this define?A container used to store a value
16. Which operator has higher precedence in the following list?
17. Look at the following code:name = input ("What is your name? ")name = input ("What is your age? ")print (name)If the user answered "John" to the first question and "23" to the second, what will be printed?
18. Which code would i use to add an item to a list?
19. ..... data type contain integer values with decimal such as 10.1, 5555.0, 33.33 etc.
20. How is a code block indicated in Python?
21. Select the correct answer:x = 15y = 4print(x // y)
22. Clara is writing a program that will print out the first ten numbers of a times table (chosen by the user). Should she use .....
23. L ..... names=['Harsh', 'Amit', 'Sahil', 'Viresh']L ..... names.pop()
24. A shell is
25. Variable.sort() will do what?