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

Quiz Instructions

Select an option to see the correct answer instantly.

1. Print("12"*3)What would this print?
2. What will the output be from the following code?print(3+4)
3. What does the 'len()' function return when applied to a string?
4. Writing comments is mandatory in Python programs (T/F)
5. What is the file extension of a Python program?
6. Print my ..... list[-1]my ..... list = [0, 1, 2, 3, 4, 5]
7. How many 'else' blocks can an 'if-elif-else' chain have?
8. What is the output of print 'Hello world!'?
9. What is the keyword to create a class?
10. Which of the following statements is true about recursion in Python?
11. What is the output of the expression 3 + 4 * 2?
12. Read the Python program below:number = 13if number < 10:print("small")if number < 100:print("medium")if number < 1000:print("large")When this program is executed, what will be displayed on the screen?
13. How to insert comments in Python?
14. What function is used to take input from the user in Python?
15. What is MicroPython optimized for?
16. What will be the output of the following code? print(type(3.14))
17. What would happen if your forgot to include a colon at the end of an if statement?
18. What is the result of mistyping a command in Python?
19. Which of the following is a keyword in Python?
20. Which of the following statements will correctly check if a number is even?
21. Select the tuple for which all() returns False.
22. What is a literal?
23. Comment statement in Python is
24. What will the following Python code output?print(2 + 3 * 4)
25. An iterative statement is also known as a ..... statement.
26. Which one is used for division in Python?
27. Python is most popular programming language. Based on the Stack Overflow Developer Survey 2021, which rank is Python in?
28. In programming, what is iteration?
29. In which of the following loop in python, we can check the condition?
30. Which of the following programs will print the 10 most frequently appearing words in a text file?
31. What is the correct syntax for a for loop in Python to iterate over a list called 'my ..... list'?
32. What is the correct way to ask the user for their name in Python and store it in a variable called 'name'?
33. To copy a list that contains other lists we can use which method of the copy module
34. What data type is represented by the value 3.14?
35. What kind of applications can a Python programmer create?
36. In the example program, which Python function is used to get numeric input from the user before casting to float?
37. What is the output of the following Python code? name = "Alex" print("Hello", name)
38. Which of these is a correct string?
39. What data type is the result of the following expression:'5 + 3.0'?
40. Which data type is used to store:TRUE
41. Which of the following is the correct way to create a list containing the values 4, 5, and 6?
42. Aturan apa yang harus diperhatikan dalam memberi nama variabel dalam Python?
43. When a value or text string entered in Interactive Mode it is immediately shown on the screen.
44. What is the name of the environment in Python that write your programs and then test them out?
45. What is the standard function used in Python to prompt the user to type in a value from the keyboard?
46. Write the output of the following code:s = None; s
47. How are statements terminated in Python and most text-based programming languages?
48. Which of the following will create a variable called 'temperature' and assign it the value $15^\circ$
49. What symbol would you use to add a comment to your code?
50. What will be the output of the following code? print(5 + 3 * 2)
51. An error in a code is called a-
52. Which is NOT a programming language.
53. What will be the output of the following code? name = input("Enter your name: ") print("Hello, '' + name)
54. What is the main advantage of using Python for web development?
55. The syntax in Python (TM) is one of the main advantages over other high level programming languages.
56. Adding strings together is called ..... & ..... is used in it
57. A mini programme used inside a larger programme
58. To show some text on the screen in Python we can use the ..... function:
59. What is the correct way to open the file file ..... in.txt for reading?
60. What are the two main types of loops in Python?