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

Quiz Instructions

Select an option to see the correct answer instantly.

1. Is the statement valid/invalidx+1=x
2. Write the output of the following:def abc():print('abc')
3. Which function is used to get user input in Python 3?
4. X = ['ab', 'cd']for i in x:i.upper()print(x)
5. What will be the output of the following code? "'pythonprint("5" + "6") "'
6. Variabel dalam Python digunakan untuk .....
7. What is the main purpose of comments in Python?
8. The suitable data type to store the value 9.76
9. What is the output of the following code?food = "burgers"number = 6print(number + food)
10. Which of the following is a correct Python command to print 'hello world'?
11. Given t = (4, 1, 3, 2), which statement creates a list sorted ascending without changing t?
12. The value that represents the absence of any value in Python is:
13. Which of the following is a binary number?
14. How do you write a comment in Python so that the text is ignored by the computer?
15. What is one way Python is used in video games?
16. This data type is used to store a mixture of letters and numbers and symbols.
17. What is the answer to print (12/6)?
18. Which of the following statements will cause a syntax error in Python?
19. Which brackets are used to define a list in Python?
20. Tipe data apa yang digunakan untuk menyimpan teks dalam Python?
21. In which year was the Python language developed?
22. What will the following code output? "'pythonprint("The temperature is", 18, "degrees Celsius") "'
23. Which of the following is used to create a dictionary in Python?
24. Which of the following is not a valid data type in Python? a) Integer b) Float c) String d) Character
25. COMMENTS BEGIN WITH ..... SYMBOL .
26. Which one is a Python data type?
27. What is the main purpose of the Tkinter library in Python?
28. What does int() represent?
29. What is the output of the following code snippet? "'pythonx = 5y = 10print(x + y) "'
30. What will be the output of the following code? print("The length is", 5, "metres")
31. Which of the following is an immutable data type?
32. What is the output of the following code? 'print("The result is '' + str(5 + 3))'
33. 42 is an example of what data type?
34. What is wrong with the following function?def add (x, y):return x + zprint (add (3, 4) )
35. What will the following code print? "'pythonx = 10if x > 5:print("Greater")else:print("Smaller") "'
36. What will be the output of the following code?x = 10if x > 5:print("x is greater than 5")else:print("x is 5 or less")
37. What is the output of the following python code:tup1=(10, 20, 40, 60, 70)print(tup1[4:2])
38. What kind of program does Python need?
39. Which operator is used to reverse the logical state of its operand?
40. Which statement best describes tuple immutability?
41. Which of the following is not in Python Character Set?
42. To add an item to the end of a list we can use which method?
43. Which of the following is a valid Python identifier?
44. What does the 'round' subprogram in PLS do?
45. How can you read a file in Python?
46. What is the name of this program?
47. What will be the output of the following code? "'pythonx = 5y = 10print(x + y) "'
48. What does this function do? input()
49. What is operator precedence and how does it affect expressions in Python?
50. You have a tuple temperatures = (12, 18, 5, 20). Which call finds the smallest temperature?
51. What is the command to create a DataFrame from a list of dictionaries?
52. This particular data type has 2 potential values (typically True or False)
53. What will following Python code return?str1="Stack of books" print(len(str1))
54. Given numbers = (1, 2, 3, 4); y = (5); numbers += y; What is the correct way to concatenate so print(numbers) shows (1, 2, 3, 4, 5)?
55. What will be the output of the following code? print('Python' * 2)
56. Find The Output.L = [5, 2, 2, 7, 5, 4, 7]print(set(L))
57. Find the outputprint(5**2)
58. Which of these is NOT a Python keyword?
59. Which of the following is a correct way to create a list in Python?
60. Which of the following is the correct way to start a multi-line comment in Python?