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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What is the index of the name 'Paula' in the following list:names = ["Paul", "Phillip", "Paula", "Phillipa"]
2. Identify the string membership operators of Python
3. Tracy always starts facing which direction?
4. The condition for a while loop to continue could include which of the following?
5. List1 = ["hello", "hey", "hi"]print(list1)How many items will be printed?
6. What will be the output shape of the following Python code?import turtlet=turtle.Pen()for i in range(1, 4):t.forward(60)t.left(90)
7. Select the correct operator for Exponentiation:
8. What is the output of the following code?for i in range(5, 0, -1):print(i)
9. Why is using lists beneficial?
10. What is the output of the following code?salary = 8000def printSalary():salary = 12000print("Salary:", salary)printSalary()print("Salary:", salary)
11. Numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]Which of the following code will give the output as[4, 6, 8]
12. In programming, what is iteration/looping?
13. What symbol do you type in to add a short comment?
14. What will be the output of the following code?def max(a, b):if a > b:print('a is the max')else:print('b is the max')max(1, 2)
15. Which of the following operator is valid in Lists?
16. What computer science concept does something different depending on the situation?
17. Which of the following types of computer languages uses binary code to communicate with the computer?
18. A:Strings can be changed during executionB. Strings can be enclosed within single, double or even triple quotesC. Strings are immutable
19. What will:answer = input("Give me a number")print(answer * 5)output?
20. Which method is used to add a value at a specified position in the list?
21. The output of the following code is# program for addition of 2 numbersa = 10b = 3c = a + bprint("the sum is ", c)
22. Which function accepts all data as string or characters but not as numbers?
23. What are class variables?
24. Which character represents a comment in Python code?
25. ..... statement can also be used without specifying Exception.