Class 11 Computer Science Chapter 2 Introduction To Python Quiz 22 (60 MCQs)

Quiz Instructions

Select an option to see the correct answer instantly.

1. Which of the following is an integer (not a string)?
2. Which of the following is the correct way to get an integer input from the user in Python?
3. Name = "Mr Gregson" print("Welcome", name)When this program is executed, what will be displayed on the screen?
4. What type of error occurs if you try to print a variable named 'mesage' when you have only defined a variable named 'message'?
5. What will the output be from the following code?print("Hello" + "world" + "today")
6. What command would you use to change the turtle's speed?
7. Which of the following is a Python command word used to indicate we want to work with DECIMAL numbers
8. Which data type in Python is immutable?
9. The opposite of True is:
10. Which of the following is a facet of data?
11. Python uses the traditional ..... character set.
12. You must import the Random library so the random functions can work
13. What does the input() function do in Python?
14. Identify the below expressions which would result in False?a) False and True b) 1==1 or 2==1c) 1==1 and 2!=1 d) True and 1==1 e) False or 1>2
15. You've created a variable to keep track of a player's score in your video game named:player ..... scoreWhich variable can be typed into your program in order to use it?
16. What is the main purpose of the Turtle Library?
17. What will be the result of the following import statement?import module ..... name as mod
18. A named memory location used to store values in computer is a .....
19. Which of the following is the correct way to get user input and store it in a variable called 'city'?
20. What are sequence commands?
21. What is printed by the following statement?print("P" not in "APCSP")
22. Which is most appropriate statement to refer to Dynamic Typing.
23. What is Script mode?
24. Which of the following is the correct way to declare a variable called 'height' and assign it the value 1.75 (in metres) in Python?
25. A Python program requires ..... to be executed.
26. What is the correct way to start a Python program?
27. What will:print(10 // 3) show?
28. This is when you convert a variable value from one type to another.
29. What is the purpose of the assignment statement in programming?
30. How do you access elements in a Pandas Series?
31. What will be the output of print(5 + 3 * 2)?
32. Code repeated / looped until a condition has been met or a set number of times.
33. Is the result of the code:print ("Hello World)
34. What is the output of the following code? "'pythontry:print(10 / 0)except ZeroDivisionError:print("Cannot divide by zero!") "'
35. Which statement correctly assigns "Sophie" to the variable name?
36. A ..... function is a process in which a function calls itself directly or indirectly.
37. What should you do before running a Python program?
38. What will be the output of the following code?my ..... list = [1, 2, 3, 4, 5]print(my ..... list[2:4])
39. A Microsoft word document is saved with the extension .doc (e.g. My project.doc). What extension is used when saving python programs?
40. What is the purpose of output formatting in Python?
41. Which value is a Boolean data type?
42. Which operator type is used in the expression var ..... 1 > var ..... 2?
43. Operator "%" dalam Python digunakan untuk operasi .....
44. Which of the following loop types is primarily used when the number of iterations is known beforehand?
45. What is computer programming?
46. Which operator performs floor division in Python?
47. What is a script library?
48. Password= input("Enter the password")What is the name of this variable?
49. Given the tuple nums = (4, 9, 2, 9), what does len(nums) return?
50. What is the purpose of variables in programming?
51. Contents from beautifulsoup are usually returned as
52. What will be the output of the following code? "'pythonprint(2 + 3 * 4) "'
53. How can you import a module in Python? Give an example.
54. What is the main advantage of using Python for beginners?
55. What is the correct command to install the "requests" library using pip in the terminal?
56. What is the purpose of the input command?
57. In which year was Python first released?
58. What is the return type of function id()?
59. What is the purpose of the Python Turtle module?
60. Choose the correct operators used in python:divide, multiply, add, subtract