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

Quiz Instructions

Select an option to see the correct answer instantly.

1. Everything that we want to display in a print() function must:
2. The collection of modules and packages that together cater to a specific type of applications or requirements, is called .....
3. Look at the following code:Length = input ("Length: ")Width = input ("Width: ")Area = Length * WidthPerimeter = 2 * (Length + Width)print (Perimeter)What is the result of this code if the user inputed 2 then 4?
4. Suppose list1 is [1, 3, 2], What is list1 * 2?
5. S1="Hello"s2="10"print(s1+n1)What is the error in this code?
6. In the Python example x = 9, 9 is the .....
7. What is Property?
8. Which operator can be used to compare two values?
9. In Python, the command "while" will create a:
10. What is the output of this python code?def foo(x):x[0] = ['def'] x[1] = ['abc'] return id(x)q = ['abc', 'def']print(id(q) == foo(q))
11. A named sequence of statements that returns a result is known as which of the following?
12. What is the output of the following code?valueOne = 5 ** 2valueTwo = 5 ** 3print(valueOne)print(valueTwo)
13. What is the goal of managing the Burmese Python population?
14. O.73 is an example of a
15. Which of the following is an example of an 'object.property(attribute)'
16. What is an expression in Python
17. Numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]print ( numbers[-3] == numbers[7])The output of the program above is
18. ..... method will returns number of key-value pairs in the given dictionary.
19. In a list called "players" if you wanted to delete the item with an index of 3 which of the following examples of code would be correct?
20. Who is the creator of Python Language
21. Which option best describes how user input can impact our programs?
22. Please select all correct ways to empty the following dictionarystudent = { "name": "Emma", "class":9, "marks":75 }Find the output:print(student.get('class'))
23. What does != represent?
24. ..... method removes all items from the particular dictionary.
25. How many elements can be inserted using append() method?
26. What was the original purpose of creating Python?
27. Any string is False, except empty strings.
28. In the following code, n is a/an ..... ?n = '5'
29. Choose the correct data type:"You follow the monster into the cave!"
30. What is the value of num when this loop completes?num = 0for i in range(2, 8, 2):num += i
31. What will be the output of the following program:fruits = ["apple", "banana", "cherry"] for x in fruits:if x == "banana":print(x)
32. What do For Loops do?
33. Suppose list=[12, 3, 22, "mago", "hello"], what is list[-6]
34. What is displayed to the screen when the following code runs? esports = ["Donkey Kong", "Galaga", "Pac Man"] esports.insert(2, "apple") print(esports)
35. The title( ) function
36. Items are accessed by their position in a dictionary
37. Ch=99print(chr(ch))
38. What function is used to output a message in python?
39. Which of the following is a Python command
40. The "break" command:
41. What is the output of program below?mariana ..... islands = ['Saipan', 'Tinian', 'Rota', 'Guam']mariana ..... islands.sort()print(mariana ..... islands)
42. Do you think a variable to store a car's value would be a class or instance variable?
43. Why is iteration important?
44. Print(9>2 and 6<=6)
45. Choose the correct data type:-5.88
46. What will be displayed on the screen when the following code is run? esports = ["Donkey Kong", "Galaga", "Pac Man"] print( esports[1] )
47. How many return statements can you place inside one function body?
48. What will be the data type of num1 if the following code is executed?num1=float(5)
49. Why the following variable name invalid:1st ..... Name
50. When do you know when you come to the end of the loop?
51. Word = "amazing"For the given string if we run word[2:5] what does it mean?
52. Which of the following would NOT work as a variable name?
53. Which of the following is the correct way to add the number 4 to mylist?
54. Why is it important to continue researching Burmese Pythons?
55. Suppose B is a subclass of A, to invoke the ..... init ..... method in A from B, what is the line of code you should write?
56. Fill in the blank such that the following Python code results in the formation of an inverted, equilateral triangle.import turtlet=turtle.Pen()for i in range(0, 3):t.forward(150)t.right( ..... )
57. If Python were to get into a fight with JavaScript, who would win?
58. Str="world of python programming"str.upper()
59. Random.random() generates a floating point number between ..... and .....
60. A character or thing that can perform actions