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

Quiz Instructions

Select an option to see the correct answer instantly.

1. List items have an index number. In the following list, which item has the index number of 3?["John", "Harry", "Jesse", "John", "Harry", "Harry", "Jill"]
2. Correct file extension for python files?
3. Three of the for loops below will provide identical values for i. Which for loop will provide values that do not match the others?
4. What are the dimensions of Tracy's world?
5. Select the right syntax to create a function called my ..... function
6. Data that is collected and sent to a computer is
7. Fruit1="kiwi"fruit2="strawberry"print(len(fruit1))print(len(fruit2))
8. What is the difference between a subroutine and a function?
9. Display the sum of 5 + 10, using two variables:x and y
10. ..... method will not only delete the item from dictionary, but also return the deleted value.
11. Find the method in the following code:hero.use("door")
12. Which of the following rules is true about locally scoped variables?
13. What is the output of the following code?sampleList = ["Jon", "Kelly", "Jessa"]sampleList.append(2, "Scott")print(sampleList)
14. Which of these isn't a Python variable type?
15. X = 5y = 6print("x*y")The code above displays the following:
16. Are Double or single quotes used in Python?
17. To insert an the string "Pedro" in the first position of a the nameList we use
18. The rules for correct spelling, grammar, and punctuation in a programming language
19. What arithmetic operations does // perform in Python?
20. Which of the following will give output as [23, 2, 9, 75]?If list1=[6, 23, 3, 2, 0, 9, 8, 75]
21. Given the code below, which answer best describes how many times the "while" loop body will run? answer = 0 while True:add = int(input("Enter a positive integer to add, or 0 to quit: ")) answer = answer + add if (add <= 0):break print(answer)
22. Choose the correct way to access value 20 from the following tupleaTuple=("Orange", [10, 20, 30], (5, 15, 25))
23. Which of the following is the slicing operator?
24. A line of text Python won't try to run as code.
25. Which commands would draw a pentagon