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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What is an algorithm?
2. What is the output of the following code? x = 2 x = x * x print(x)
3. In Python a list with no elements like this [] is also called:
4. Pick the Python command used to let the user type in some data
5. Print( "Mypython" *3)
6. A statement is .....
7. How do you immediately exit a loop in Python?
8. Read the Python program below:print("Enter a number")number = int(input())if number > 0:print(number, "is positive")else:print(number, "is negative")When this program is executed, what will be displayed on the screen if the user enters 0 at the prompt?
9. What must you use at the end of an if line in Python?
10. Python was created by:
11. What are algorithms?
12. A data type that can only be one of two values:True or False
13. What is the correct syntax to output "Hello, World" in Python?
14. Which of the following data types is NOT supported in Python?
15. What type of programming paradigms does Python support?
16. What will happen if you try to print a variable that hasn't been defined?
17. Which command is used to read every line from a file one at a time in Python?
18. Which of the following is a string data type in Python?
19. If first ..... name = "Kevin" and last ..... name = "Drumm", which line joins them with a space?
20. What is the output of the following code?print("The temperature is", 25, "degrees Celsius.")
21. Matplotlib digunakan untuk .....
22. Escape sequence is represented by a ..... followed by one or more characters
23. Python is ..... level programming language and is .....
24. What is the correct syntax to define a multi-line string in Python?
25. What does IDE stand for?
26. If you want to store the value 3.14 in a variable called 'pi', which data type will Python use?
27. Print("Enter a number")number = int(input())if number = 0:print(number, "is zero")else:print(number, "is non-zero")When this program is executed, what will be displayed on the screen, if the user enters 0 at the prompt?
28. Id() function is used to get
29. Which statement is TRUE about variables?
30. Let a = ("apple", "banana") and b = ("cherry", ). Which result comes from a + b?
31. What does the print() function do in Python?
32. Which library must be imported to use the sqrt() function?
33. What is the output of the expression 8 // 3?
34. How do you convert a string to an integer in Python?
35. What will be the output of the following code?if 5 > 3:print("Yes")
36. What command is used to print text to the screen?
37. What is the output of the expression 10 / 2?
38. How is a block of code defined in Python?
39. What is the index of the first element in a Python list?
40. What is Python named after?
41. Identifier name can be of maximum ..... character
42. How do you concatenate the strings '"Good"' and '"afternoon"' in Python?
43. Which value is a String?
44. Keyword apa yang digunakan untuk mendefinisikan sebuah fungsi di Python?
45. The List Data Type, Working with Lists, and Augmented Assignment Operators are covered in which module?
46. Which if the following is a disadvantage of Python?
47. What will be the output of the following lambda function?add = lambda a, b:a + bprint (add (3, 4) )
48. How do you define a floating point number in Python?
49. Which of the following is not a valid way to define this dictionary in Python:
50. The two major versions of Python are:
51. What is the output of the following code? "'pythonx = "Python"y = "Programming"print(x + '' '' + y) "'
52. A ..... tool creates exact copies of your files to be restored later in case of data loss.
53. Stores a piece of data, and gives it a specific name
54. Which of the following is not a feature of Python language?
55. How do you declare a variable in Python?
56. What is a notable characteristic of Python code?
57. What will be the output of print(type(12.0)) in Python?
58. Bagaimana cara membuat variabel dalam Python?
59. What is the output of:print(3 * 'A')?
60. ..... method is used to find the data type of a variable.