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

Quiz Instructions

Select an option to see the correct answer instantly.

1. Find the outputa = "5"print(type(a))
2. What is Python primarily used for?
3. The data type of '123' is:
4. THE SMALLEST INDIVIDUAL UNIT IN A PROGRAM IS KNOWN AS A .....
5. What is the output of the following code? print(2 + 3 * 4)
6. Can Python be used for web development?
7. How do you add a comment to Python code?
8. What is the main purpose of using Python programming language?
9. How do you make the drawing canvas bigger in the turtle graphics library?
10. Who is the creator of Python programming language?
11. ..... are data items that have a fixed value
12. What will be the output of the following code? "'pythonlength = 5unit = "metre"print(length, unit) "'
13. What is the purpose of a code editor in an Integrated Development Environment (IDE)?
14. Which of these is a correct comment in Python?
15. Which of the following is an example of a variable in Python?
16. Python supports variable number of parameters.
17. What type of error is returned by the following statement? print(eval(13))
18. Machine code uses the binary number system.
19. What does the input() function allow a user to do?
20. What is the correct syntax to print the text 'Hello, World!' in Python?
21. Given t = ("red", "blue", "blue", "green"). What does t.index("blue") return?
22. A computer ..... is a detailed, step-by-step set of instructions telling a computer exactly what to do.
23. Debugging is the process of .....
24. Look at the code snippet:fruits = ("apple", "banana", "cherry"); print(len(fruits)). What is printed?
25. What version of Python are we learning this year?
26. What will be the output of the following code?print("Hello", "World", sep="-")
27. A = 10b=5b=a+5print(b)What would be printed to the screen in this example?
28. Which of the following is an example of Python's uses and application?
29. How do you concatenate two strings in Python?
30. What is NumPy used for?
31. What are the two types of IDLE mode in Python?
32. The instructions in an algorithm .....
33. What is Flask used for?
34. Which approach best handles sorting when duplicates exist in a tuple?
35. What is the word (command) used to display numbers and text on the screen?
36. What is the purpose of the 'len()' function?
37. Which of the following is NOT a way to do math in Python?
38. What is a lambda function?
39. Which of the following is necessary before writing a Python program?
40. Print(a, b)b = 64a = 6When this program is executed, what will be displayed on the screen?
41. Which of the following is NOT an application of Python?
42. Which of the following is a correct way to assign a value to a variable in Python?
43. Which of the following is a valid way to declare a variable in Python?
44. Which of the following statement will return error when x = 7?
45. What is the primary purpose of Python in real-world applications?
46. What does an 'if' statement do in Python?
47. Which of the following best describes Python's syntax?
48. Which data type would be most suitable for storing a collection of items of different types?
49. Bagaimana cara menambahkan komentar di Python?
50. What does the 'range()' function do in Python?
51. What will print(2 ** 3) output?
52. What is Django primarily used for?
53. Which of the following assignment will return an error?
54. What function would you use to convert a string to an integer?
55. How many local and global variables are there in the following Python code?var1=5def fn():var1=2var2=var1+5var1=10fn()
56. What are floats in Python?
57. Which of the following is the first step in program development?
58. The features of Python
59. To get the users input what function do we use?
60. What is the correct way to add comments in Python code?