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

Quiz Instructions

Select an option to see the correct answer instantly.

1. Which of the following is a correct way to start a comment in Python?
2. Why Python is in demand?
3. Which of the following is NOT a built-in data type in Python?
4. What is printed by the following statement?print("A" in "APCSP")
5. What will be the output of the following code?my ..... dict = {'name':'Alice', 'age':25}print(my ..... dict['name'])
6. What is string concatenation used for?
7. What data type is 12.0?
8. The instructions in a program .....
9. What is the output of the following code?name = input("Enter your name: ")print("Hello, '' + name + "!")(Assume the user enters "Alice")
10. What is the correct way to declare a variable in Python?
11. Which is NOT a legal variable name?
12. Why is else placed at the end of an if-elif-else chain?
13. You receive data as a list:data = [9, 2, 9]. Which single call turns it into an immutable sequence?
14. A line of text that Python won't try to run as code
15. What is Python commonly used for in AI?
16. What is the output of the following code? "'pythonounces = 16print("There are", ounces, "ounces in a pint.") "'
17. Which of the following is a valid way to assign multiple values to variables in Python?
18. Which data type is used to store text?
19. What will the following code output? print('Hello' + str(5))
20. Which of the following is used to store a sequence of items in Python?
21. What does turn(90) do?
22. What command is used to run a Python script in IDLE?
23. The boolean expression True or Falseevaluates to:
24. What is the output of the following code? "'pythonprint(7 + 3) "'
25. Which of the following represents "equal to" in Python?
26. What does the 'values' attribute of a DataFrame return?
27. Which of these is NOT a core component of a computer?
28. What is the correct way to exit a while loop prematurely in Python?
29. Choose the correct syntax for lambda function.
30. How can you make an exception more reusable in Python?
31. How do you create your own module in Python?
32. What extension must you add to the end of a file when saving?
33. The items listed in the parenthesis of a procedure definition are called .....
34. A programmer types flt(price), what type of data are they assigning to the price?
35. What is the result of the expression '5 + 3 * 2' in Python?
36. Which operator is used for division?
37. Bagaimana cara menyisipkan komentar dalam kode Python?
38. Which of the following is NOT a sequence type in Python?
39. Which of the following statements is true about Python lists?
40. Which of the following is the correct way to convert a string '"25"' to an integer in Python?
41. What is the file format of Jupyter Notebook(Google Colab)?
42. What is the purpose of the requestString() function?
43. How do you create a variable in Python?
44. What is an error?
45. Which of the following is a loop in Python?
46. What is the data type of L if L = [1, 'Python', 2.5]?
47. How can you import only specific functions from a module?
48. Example of valid identifiers
49. What is a programming language?
50. Which line correctly converts a string to an integer?
51. Which of the following is a valid way to comment in Python?
52. What happens when you type print("3" + "4")?
53. What is Python described as?
54. What does the following code display?a = 1b = 2print(a + a)
55. What is the output of the following code? "'pythonprint(len("Python")) "'
56. Which of the following is NOT a programming paradigm supported by Python?
57. Which of the following is a boolean value in Python?
58. To repeat a task many times, we use a:
59. What is syntax in programming?
60. Which of the following is NOT a logical operator in Python?