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

Quiz Instructions

Select an option to see the correct answer instantly.

1. C=35 if 34<43 else 43
2. What output will this code produce?
3. What does the '#' allow you to do?
4. Which one of the following is the correct way of calling a function?
5. In Python, list is mutable
6. If, else and elif is used for .....
7. The result of this program:Friday = Falseif Friday:print "Jeans day!"else:print "Uniform day"
8. In Python, iteration is another word for a:
9. What will be the output?names1 = ['Amir', 'Bala', 'Chales']if 'amir' in names1:print(1) else:print(2)
10. An expression is
11. Which one of theses is floor division
12. What method is used to remove the first occurrence of a specific value from a list in Python?
13. The help statement display ..... from a module.
14. What is the output of the following lines of code?var1 = 12var1 = 23.4var1 = "I love AI!"print(var1)
15. Look at the following code:age = int(input ("What is your age? "))age = age + 1print (age)If the user inputs 23, what is the result of the code?
16. What can we use to get the first character of a string txt= "Banana"
17. True or False:phone.number is a good name for a variable.
18. What is used to print the length of a string
19. Which logical operator is used to combine two conditions and returns True if both conditions are True?
20. Choose the correct data type:"Resolution"
21. In the following code, what type of variable is being created?foo = "bar"
22. Read the following Python code carefully and point out the global variables?y, z = 1, 2def f():global x x = y+z
23. What is the position of the name 'Paula' in the following list:names = ["Paul", "Phillip", "Paula", "Phillipa"]
24. Identify the data type of T:T = ['A', '23', '92', '(10, 20)']
25. What will happen when we run this:Yourname = input()print ("Hi there, ", yourname)