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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What is the main emphasis of Python?
2. What is the syntax error with this code:print( "Hello World" );
3. Used to make comments
4. What does the following code do? "'pythonfor i in range(3):print(i) "'
5. Which construct lets Python choose among more than two paths?
6. What will be the output of the following code? "'pythonnumbers = [10, 20, 30]print(numbers[1]) "'
7. Which programming language uses loops?
8. A compiler is a software program that:
9. What is a Constant?
10. What is the result of the expression 9 * 3 in Python?
11. Who designed Python?
12. Which symbol is used to start a comment in Python?
13. Which of the following statements will correctly check if a variable 'a' is equal to 10?
14. What is the purpose of the IDLE interpreter in Python?
15. What do we use variables for?
16. Which of the following is a float in Python?
17. What is the purpose of the 'elif' statement in Python?
18. Which statement shows understanding of why tuples are handy in programs?
19. What are keywords in Python? Give an example.
20. Is the result of the following code:print(random.randint(3, 9))
21. Which of the following is NOT an example of a high-level programming language?
22. What file extension should you use to save a Python script in IDLE?
23. Which of the following is used to create a function in Python?
24. What will be the output of the following code? "'pythonname = input("Enter your name: ")print("Welcome, '' + name) "'If the user enters 'Alice', what is printed?
25. What is the purpose of the task:first = user INPUT(), last = user INPUT(), OUTPUT:first + last?
26. Which function adds a counter to a list when used in a for loop?
27. What is the main advantage of using Python over Java?
28. How to create a numeric variable age with a value of 10
29. What is the purpose of the input() function?
30. Why are tuples considered immutable?
31. Input("Enter the password")Inside the bracket is known as a .....
32. What is the output of the below code snippet?tup1=([3, 6], [2, 1])list1=[(8, 9), (7, 0)]list2=tup1[0]list2[1]=5list1[1]=(5, 2)print(tup1, list1)
33. How are letters represented in binary?
34. Which of the following is a valid way to append an element to a list in Python?
35. What will be printed after running this FOR loop:for number in range(6):print(number)
36. Which of the following is an application of Python?
37. How to check the datatype?
38. What can you do with Python?
39. Which symbol is used to separate string and integer data?
40. Which subprogram in PLS is used to return the length of an object?
41. What is the purpose of identifiers in Python?
42. For tuple t = (0, False, 3), what is the step at which any(t) returns True?
43. # in Python programming refers to
44. What is a multi-line statement in Python?
45. What is the purpose of the tab key in Python programming?
46. A variable may be assigned a value of one type, and then later assigned a value of a different type:
47. Which of the following is the first step in setting up Python?
48. Which data structure does NOT allow duplicate values?
49. What is the correct way to declare a constant in Python?
50. Tuples are enclosed with in .....
51. What will be the output of the following code?for i in range(3):print("Hello")else:print("Done")
52. What are the two main types of errors in programming?
53. What is missing from this line of code?
54. Which of the following cannot be a variable?
55. Fungsi bawaan (built-in function) adalah fungsi yang .....
56. What is the purpose of the 'Disable path length limit' option in the Python setup?
57. Python language use
58. Consider fruits = ('apple', 'banana', 'cherry'). Which conditional correctly prints 'Not found' when an item is absent?
59. Which file extension should you use to save your code as a Python program file?
60. Python accepts single ('), double (") and triple (" ' or """) quotes to denote strings. Which of the following is NOT acceptable Python syntax?