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

Quiz Instructions

Select an option to see the correct answer instantly.

1. Strings must always be written inside quotation marks in Python.
2. A student wants the output to be Aisha Khan. Which line should they use?
3. What will happen if you tell Tracy 'forward 50' and run the code?
4. What is the function of syntax error?
5. What is the result of the following code? "'pythonweight = 12.5print(type(weight)) "'
6. What data type will the variable 'age' have after executing the following code?age = input("Enter your age: ")
7. What is the first step to execute Python code?
8. In PLS, which of the following is NOT a primitive data type?
9. TRUE or FALSE:Python is named after a snake.
10. What should you do if you want to output the lines of your favorite song in Python?
11. What will be the output of this code?for i in range(5):if i == 3:breakprint(i)
12. What is the first step in the Green Screen effect?
13. Which of the following is the final step in program development?
14. Fungsi lambda pada Python disebut juga .....
15. How to find the length of a list in python?
16. Consider nums = (5, 3, 5). After calling sorted(nums), which statement about the result is correct?
17. What is the primary purpose of an Integrated Development Environment (IDE)?
18. To print a list called fruitList we use
19. Fungsi apa yang digunakan untuk menampilkan output ke layar dalam Python?
20. What type of data does input() return?
21. Which of the following is NOT a valid way to assign a value to a variable in Python?
22. How do you make a comment in Python?
23. What will be the output of the following code? x = "10" y = 5 print(x + str(y))
24. You have place ..... of ..... birth = "Middlesbrough" . Which line will produce a neat sentence?
25. How to manipulate tuples?
26. A collection of stored Python functions is called a-
27. What is the extension for a Python file?
28. Which of the following lines of code will correctly store the number 25 as an integer in a variable called 'age'?
29. How could we represent/describe the process of a computer making a decision in a program?
30. What is a for loop?
31. The datatype of a variable can be found by using the following function:
32. Which is used to end an if statement block?
33. Explain what a function is in Python.
34. Which function is used to take input from a user?
35. "and, or and not" are .....
36. Extension file in python is
37. What method in Python is used to add an element to the end of a list?
38. Write the output of the following code:x=2; x=5; x=x+x; print(x)
39. Why is it important for students like Sebastian, Anaya, and Ella to learn computer science in school?
40. Which of the following tasks should a program perform based on the given requirements? (a) Generate a Fibonacci sequence of length N. (b) Calculate factorial and binomial coefficient using N and R.
41. What does print('a' in 'cat') output?
42. What is the output of the following code? print( 100/5)
43. What is the name of the Python environment that allows you to write your program and then test them out?
44. In a flowchart, parallelogram is used to represent .....
45. What is the output of the following code?x = 3while x > 0:x-= 1print(x)
46. What is the output of print('Age:', age) if age = 25?
47. Which one of these is floor division?
48. How do you print "Hello, World!" in Python?
49. What is the result of the following expression:$4 * (2 + 3)$
50. Python is known as .....
51. How do you create a variable with the floating number 2.8?
52. What is the role of a Python interpreter?
53. What will the following code output if the user inputs "Alice" ? 'name = input("Enter your name: ")' 'print("Hello '' + name)'
54. Which of the following correctly accesses value 85 from a dictionary d = {"marks":85}?
55. What is the purpose of indentation in Python?
56. Tahap data cleansing berarti .....
57. What does 'len()' return?
58. What is the result of 'math.sqrt(x)'?
59. What is a nested loop? Provide an example.
60. Which of the following is a valid way to create a set in Python?