Looking for the best computer course near you in Lucknow? Join KAiSH Computer Institute, Aliganj, Kapoorthala – trusted since 2013. We offer job-oriented courses like CCC, O Level, ADCA, DCA, MS Office, Tally, Advanced Excel, Web Designing, Python, Data Analytics & more. Get expert faculty, govt-certified courses & 100% practical training. Enroll today and start your IT career with confidence!
Sunday, July 6, 2025
Thursday, December 12, 2024
Top O Level Python MCQ Questions: Learn & Test Your Knowledge
Top 10 Python MCQ For NIELIT O level
1. What is the output of the following Python code?
x = [1, 2, 3, 4]
print(x[2:])
a) [1, 2, 3]
b) [2, 3, 4]
c) [3, 4]
d) [1, 2]
2. Which of the following is used to define a function in Python?
a) function()
b) def function()
c) func()
d) define function()
3. What will be the output of the following Python code?
x = 5
print(x == 5)
a) True
b) False
c) Error
d) None
4. What is the correct syntax to create a dictionary in Python?
a) d = {key1: value1, key2: value2}
b) d = (key1: value1, key2: value2)
c) d = [key1: value1, key2: value2]
d) d = key1: value1, key2: value2
5. Which of the following Python data types is immutable?
a) List
b) Dictionary
c) Set
d) Tuple
6. What is the correct way to create a class in Python?
a) class MyClass:
b) create MyClass:
c) define MyClass:
d) class: MyClass
7. What is the output of the following code?
x = "Hello"
y = "World"
print(x + " " + y)
a) HelloWorld
b) Hello World
c) "Hello" "World"
d) None
8. Which method is used to get the length of a list in Python?
a) list.length()
b) len(list)
c) size(list)
d) list.size()
9. What will be the output of the following code?
x = [1, 2, 3]
y = x
y[1] = 4
print(x)
a) [1, 2, 3]
b) [1, 4, 3]
c) [4, 2, 3]
d) Error
10. Which Python module provides regular expression functionality?
a) re
b) regex
c) reg
d) regexp
Answers:
- b) [2, 3, 4]
- b) def function()
- a) True
- a) d = {key1: value1, key2: value2}
- d) Tuple
- a) class MyClass:
- b) Hello World
- b) len(list)
- b) [1, 4, 3]
- a) re