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

Quiz Instructions

Select an option to see the correct answer instantly.

1. Which of the following statements is correct for variable names in Python language?
2. What will be the output from the following code?print(17%5)
3. If list=[17, 23, 41, 10] then list.append(32) will result
4. Dictionary keys must be .....
5. List items are indexed, the first item has index [1], the second item has index [2] etc.
6. A sequence of immutable objects is called
7. What is the maximum possible length of an identifier?
8. Which of these commands would successfully create a turtle named Alice
9. When you compare two values, the expression is evaluated and Python returns the Boolean answer.
10. What can we use to get the characters from index 2 to index 4 (llo) in txt = "Hello, World"
11. When we create a program to extract each alphabet from a given string, what is it known as?
12. The command which helps us to reset the pen (turtle):
13. Which of the following will delete key-value pair for key, "Name" from a dictionary stud?
14. What is the extension on a Python file name?
15. In python the Division sign is .....
16. You are asked to write a program where the user types in the amount of marks they got for a paper with 70 marks. The program then calculates and displays their score as a percentage. What is the process?
17. True or False:5.0 is an example of the 'float' datatype.
18. What is the output for the provided code?print(type(15 == 14))
19. Python is a general purpose programming language created by
20. If Tracy starts at the left edge of the canvas and moves forward 50 pixels, how many times will this code need to be repeated to have Tracy reach the right edge of the canvas?
21. User defined Exceptions are created from the ..... Parent Class
22. What will the following code do? name = "Bob"if name == "Bob":print ("Hello '' + name) else:print ("I dont know you")
23. Following set of commands are executed in shell, what will be the output? >>>str="hello">>>str[:2]
24. Which is the correct way to declare and initialize a variable in Python?
25. Which of the following functions build the abstract data type?
26. There are 40 students in a classroom. We would like to get all students whose name starts with "A" . Which looping is suitable?
27. How is a function declared in Python?*
28. Create a variable named bike and assign the value Kawasaki H2R to it
29. If you want to test more than one condition (chained condition), what do you use after if statement?
30. All lines in a while loop must be indented this number of spaces to be included in the loop
31. Python Moduleto be used while implementing DICE game.
32. Choose the correct data type:10500
33. What, if anything, is wrong with the following?input("Type your password: ")
34. Which of the following is a Python command word used to indicate we want to set up a fixed loop
35. Which of the following would be an example of a string variable:
36. Look at the following code:age = input ("What is your age? ")age = int(age + 1)print (age)If the user inputs 23, what is the result of the code?
37. Which symbol should you use to assign a value to a variable?
38. What will the be the output of the following code?if (10<0) and (0 <-10):print( "A" )else:print( "B" )
39. Below are the valid data types in Python EXCEPT
40. A step-by-step process, or a defined list of steps required to accomplish a goal
41. How many keywords are there in python 3.7?
42. What 'object' do you control in Python turtle?
43. What would you put in an if statement to see if two values are equal?
44. Numbers = [5, 14, 9, 17]for number in numbers:if number % 3 == 0:print(number)The output will be?
45. A straight line passing from side to side through the center of a body or figure, especially a circle or sphere, defines
46. To fill a shape with the colour red, which command is correct?
47. Select the correct operator for multiplication:
48. Choose the correct data type:"initial of a first name"
49. List items are ordered, changeable, and allow duplicate values.
50. Which of the following is used in Python to give a value to a variable
51. Which of the following function is used to count the number of elements in a list?
52. In python, "Hello World" is the same as 'Hello World'
53. What is the result of the following code?print(bool(0))
54. . Which of the following definitions for the "haunted" function will correctly set the default value for the "surprise" parameter equal to the number 1?
55. Find the object in the following code:helper.build("upArrow")
56. Computer programs can store information like the user's progress in a videogame with .....
57. A = Trueb = Falsec = Falseif a or b and c:print ("GEEKSFORGEEKS")else:print ("geeksforgeeks")What will be the output?
58. What data type represents only two possible outcomes?
59. Numbers = [1, 2, 3, 4, 5]Which of the following code changes the element 4 to 9
60. Select the correct operator for division: