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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What is the output of the following code?listOne = [20, 40, 60, 80]listTwo = [20, 40, 60, 80]print(listOne == listTwo)print(listOne is listTwo)
2. T=((1, 2, 3), (3, 4))what is T[1][1]
3. MATCH THE FOLLOWING:1. concatenation A) +=2. Append B) [ ]3. String Slicing C) * 4. Repeating D) +
4. What is the output of the following code?for i in range(1, 6, 2):print(i)
5. What would be printed by the commandprint('12-5')
6. If we needed to store information such as a POSTCODE in PYTHON, what data type would we use?
7. Identify the first statement that creates a class named Employee.
8. A="god help those who help themselves""help" in "a"
9. The number of lines drawn in each case, assuming that the turtle module has been imported:Case 1:for i in range(0, 10):turtle.forward(100)turtle.left(90)Case 2:for i in range(1, 10):turtle.forward(100)turtle.left(90)
10. If a function named "mystery" is defined as taking no parameters, how would you call that function from your code?
11. What is the order of precedence in python?$^{i) Parentheses}$$^{ii) Exponential}$$^{iii) Multiplication}$$^{iv) Division}$$^{v) Addition}$$^{vi) Subtraction}$
12. In programming, lists are often known as .....
13. Who manages the development of Python?
14. Look at the following code:age = 23age = float(age)What does the float() function do to the data inside age?
15. A FOR loop is .....
16. What would be printed to the screen?x, y, z = "Orange", "Banana", "Cherry"print(z)
17. A data type consisting of positive and negative whole numbers
18. Choose the correct data type:0.25
19. You write a program where the user types how many apples they want to buy. The program calculates the total cost and displays it on the screen in pounds. What is the output?
20. Choose the correct data type:Height (in metres) Example:1.64
21. ..... data type contain a set of characters (text) or word such as Hello, Ali, Car Type etc.
22. Python correct naming convention for variables is?
23. What is the purpose of the else statement in a for loop?
24. True or False:There are no symbols which can be used in a variable name.
25. Numbers = [1, 3, 5, 7]Which of the following code inserts 9 into the list above at index 2
26. Str="computer"print(str[-6:-1])
27. How do you write a program in Python?
28. A straight line from the center to the circumference of a circle or sphere is the
29. What is the keyword needed to repeat code (iterate) in Python?
30. My ..... name = "Awesome"My ..... name in this string is .....
31. How do i remove something from a list?
32. People = ["John", "Rob", "Bob"]print (people[4]) what would this result be?
33. Python is the fastest growing programming language:
34. Choose the correct data type:"£"
35. What is the name of the built-in command in python to output data?
36. Is python an interpreter or compiler programming language?
37. Which of the following best describes where you should define your function in your code?
38. Please select all correct way delete the following dictionarystudent = { "name": "Emma", "class":9, "marks":75 }
39. Which of the following sequences would be generated by the given line of code?range (10, 0, -5)
40. Extension of Python
41. You have the following dictionary definition:d = {'foo':100, 'bar':200, 'baz':300}What method call will delete the entry whose value is 200?
42. What does the following code do? myAge = int(myAge)
43. Which function truncates the fractional part of given number and returns only the integer or whole part.
44. What is the correct definition for 'pseudo code?'
45. Grades = [2.0, 3.0, 4.0]How do you get the length of the list above
46. A = ['foo', 'bar', 'baz', 'qux', 'quux', 'corge']Which display correct output from below?
47. Mr. Whiting is 45 years old. This is an example of:
48. Which two statements are used to implement iteration/Repetition)?
49. How do you access the first element of a list in Python?
50. How will the following code look on the screen?print ("I love programming.") print ("I love programming.")
51. Str1='101'x=int(str1)z=x+400print(z)
52. In the following code, what value will be assigned to the variable "cat" ?mouse + cat + dog = "small" + "medium" + "large"
53. What is displayed to the screen when the following code runs? esports = ["Donkey Kong", "Galaga", "Pac Man"] esports.insert(0, "Centipede") print(esports)
54. What is the output of the following code?Time = "Day" Sleepy = False Pajamas = "Off" if Time == "Night" and Sleepy == True:Pajamas = "On" print(Pajamas)
55. Variable names can start with .....
56. Which data type is used to store whole numbers in Python?
57. ..... function can be used to insert an element/object at a specified index.
58. ..... is a data type that contains a single character such as A, a, Z, z etc.
59. What is an example of a boolean?
60. What is the output of the code shown below?g = (i for i in range(5))type(g)