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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What does the 'len()' function do in Python?
2. What will the output be from the following code?print("Hello world!" * 2)
3. What does Python turtle allow you to do?
4. What programming language do web developers use to create dynamic web applications besides HTML and CSS?
5. You want three different messages for weather: "rainy", "sunny", or "snowy" . Which structure should you use?
6. Which of the following is a list in Python?
7. What is PEP 8 in Python?
8. What is a variable defined inside a function referred to as?
9. What data type is the variable result in the following code?result = 10 + 2.5
10. What will print(2 / 0) output?
11. What will be the output of the following code? "'pythonx = 3y = 4if x > 2 and y < 5:print("Yes")else:print("No") "'
12. The print() function can be used to add numbers only.
13. Select the correct input command below
14. What is the output of the following code? print(type(10))
15. What type of language is Python?
16. What will be the output of the following code? "'pythonif 3 > 2:print("Yes")else:print("No") "'
17. A Python data type that holds positive and negative whole numbers
18. What is the output of the following code? "'pythonx = "Python"print(x[0]) "'
19. Which one is Karel command?
20. What are some popular programming languages mentioned?
21. What happens during the program compilation process?
22. What is the output of the following code?x = 5if x > 3:passelse:print("Hello")
23. A statement in programming
24. Where was Guido van Rossum born?
25. What does len([1, 2, 3]) return?
26. What does the 'pop()' method do in a list?
27. In Python, ..... does not copy a value; it just attaches a name to the object that contains the data.
28. What is the traditional implementation of Python called?
29. What does the 'continue' statement do in a loop?
30. What is a syntax error in Python?
31. What is an if statement in Python?
32. Which of the following is a valid string in Python?
33. What is the result of 10 % 3?
34. What will print(10 // 3) output?
35. Input() function takes the input from the user and always returns it as a:
36. What is the result of the expression 10-4 in Python?
37. Which is the correct syntax?
38. What does the following code do? myAge = int (myAge)
39. What is the value of 'result' after the following code is executed? "'pythonresult = 15-4 "'
40. The term which describes errors in a programme which are due to the programmers algorithm and calculations being wrong
41. What symbol is used to join (concatenate) variables in Python?
42. Read the Python program below:print(a, b)b = 42a = 13When this program is executed, what will be displayed on the screen?
43. Which of the following statements about variables in Python is TRUE?
44. What is the backdrop area called in Scratch?
45. After converting a tuple to a list for editing, which operation is appropriate before restoring immutability?
46. What are syntax errors in programming?
47. What is a string in programming?
48. The term which describes identifying errors in a programme and fixing them
49. What is a program in computer science?
50. What happens if you use else with a for loop?
51. Which one checks if something is true?
52. Which of the following is a method of a list in Python?
53. Which of the following is a Python command word used to indicate we want to work with WHOLE numbers/Integers
54. What is wrong with this line of code?print("Hi)
55. Comments in Python are written with a special character, which one?
56. What is a computer program?
57. What will the following code print? "'pythonfor i in range(3):print("Python") "'
58. What button do you press to compile (run) your program so that it runs in the shell?
59. What is the output of the given Python code:print("ab", "cd", "ef", sep='*')
60. Which symbol stands for divide?