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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What does an exception in Python refer to?
2. An example of a high-level programming language is:
3. In the installation process shown, which option should be checked to ensure Python is added to the system PATH?
4. What is the value of 'x' after the following code runs? "'pythonx = 10x = x + 5 "'
5. Which operator is used in Python to divide one number by another and get the result as a decimal (floating point number)?
6. Apa yang dilakukan fungsi 'len()' dalam Python?
7. Generally speaking, a low level programming language is easier to read, write and maintain over a high level programming language
8. What is the purpose of a loop in programming?
9. What is the input for the following code?Python iseasy
10. What will be the output if the user inputs 15?def check ..... even ..... odd(number):if number % 2 == 0:return "Even" else:return "Odd"user ..... input = int(input("Enter a number: "))print(check ..... even ..... odd(user ..... input))
11. Which subprogram would you use to fill a shape with color in the turtle library module?
12. Differentiate between identifiers and keywords.
13. Variable names are not case-sensitive.a = 5# is the same asA = 5
14. Python is ..... typed, which means that the type of an object does not change
15. A syntax error means your code has a 'grammar' mistake or you used symbols/operations incorrectly
16. Which of the following is the correct way to define a function in Python?
17. A price such as 3.65 pesos should be saved as what kind of variable?
18. What is the result of 3**2
19. What does casting do?
20. Describe the structure of an if-elif-else statement.
21. Fill in the blank:The Integer, Floating-Point, and String Data Types are introduced in .....
22. What is the meaning of the arithmetic operator '%' in programming?
23. An element of a programme which stores a value that can change as the programme is run
24. The smallest individual unit in a program is called as
25. Python code runs .....
26. What is the function of the 'else' statement in selection constructs?
27. What is the effect of the following import statement?from math import *
28. Which of the following is NOT a legal variable name
29. How do you ask an input from a user?
30. What will be the output of the following code? "'pythonx = input("Enter a number: ")print(type(x)) "'
31. What is the purpose of f-strings in Python?
32. Comments in Python program are ..... by interpreter
33. What is the output of the following Python code? print("Hello, world!")
34. What will be the output of print(bool([]))?
35. What will be the output?name = "Dave"print (name)
36. What does "assignment" mean in Python?
37. Which of the following is a correct 'for' loop in Python?
38. What does it mean for Python to be dynamically typed?
39. What type of error is demonstrated by the following code? x = "ABC" + 2
40. Which is the best type of loop to write a file in?
41. What will happen if indentation is incorrect?
42. What operator would I need to divide 5 by 10?
43. What command would you use to move the turtle forward by 100 units?
44. What does the input() function return in Python?
45. What is the value of $2 + 3$
46. What are the applications of Python?
47. What is the purpose of the 'import ' statement in a program?
48. How can you take user input in Python?
49. How do you access the first element of a list named 'fruits'?
50. Which data type below is an int?
51. Before you can use a powerful external module, such as the math library or a custom module, what must you do first in your Python script?
52. What is the comparison operator for 'equal to' in Python?
53. What is the output of the following Python code? x = 10x = x + 1print(x)
54. Is an example of what data type?
55. Which generation of computers used Transistor based hardware?
56. What is the correct syntax for an if statement?
57. In Python a list slice from start to end can be used to
58. Perbedaan utama tuple dan list adalah .....
59. Data = "No Way!" The expression len(data) evaluates to:
60. How do you check the number of rows in a DataFrame?