O level m3 r5 mcq questions with answers -

O level m3 r5 mcq questions with answers

Are you preparing for the upcoming O Level M3 R5 mcq exam in July 2025? This guide brings you the most important and frequently asked MCQ questions with answers from the Python Programming module. These multiple-choice questions are carefully curated from the official NIELIT syllabus and previous year papers, making them perfect for your revision. Whether you’re targeting top scores or just want to strengthen your concepts, these O Level M3 R5 MCQs will help you practice effectively and boost your confidence.

  1. What is the output of print(2 ** 3)?
    A. 6
    B. 8
    C. 9
    D. 5
    Answer: B

  2. Which of the following is a valid Python variable name?
    A. 2variable
    B. variable-name
    C. variable_2
    D. variable name
    Answer: C

  3. What is the data type of 5.0 in Python?
    A. int
    B. double
    C. float
    D. long
    Answer: C

  4. Which of these is used to define a function in Python?
    A. define
    B. function
    C. def
    D. fun
    Answer: C

  5. What is the correct way to write a comment in Python?
    A. /* comment */
    B. // comment
    C. <!– comment –>
    D. # comment
    Answer: D

  6. What does the len() function do in Python?
    A. Returns the number of variables
    B. Returns the length of a string/list
    C. Converts to integer
    D. Joins strings
    Answer: B

  7. Which keyword is used to start a loop in Python?
    A. repeat
    B. loop
    C. for
    D. iterate
    Answer: C

  8. What will be the output of print(3 == 3.0)?
    A. False
    B. Error
    C. True
    D. None
    Answer: C

  9. How to insert an element at the end of a list?
    A. list.add()
    B. list.append()
    C. list.insert()
    D. list.push()
    Answer: B

  10. What is the result of int('10') + float('5.5')?
    A. 105.5
    B. 15.5
    C. Error
    D. 10.5
    Answer: B

  11. Which operator is used for floor division in Python?
    A. /
    B. //
    C. %
    D. **
    Answer: B

  12. What is the output of 'Python'[1]?
    A. P
    B. y
    C. t
    D. h
    Answer: B

  13. Which function converts a string to an integer?
    A. str()
    B. int()
    C. float()
    D. eval()
    Answer: B

  14. What does range(1, 5) return?
    A. [1, 2, 3, 4]
    B. [1, 2, 3, 4, 5]
    C. [1, 5]
    D. [2, 3, 4, 5]
    Answer: A

  15. What is the output of type([])?
    A. list
    B. tuple
    C. dictionary
    D. array
    Answer: A

  16. What is the result of bool(0)?
    Answer: False

  17. Which of the following is immutable?
    A. list
    B. set
    C. tuple
    D. dictionary
    Answer: C

  18. What does break do in a loop?
    Answer: Exits the loop

  19. is operator is used to compare…?
    Answer: Object identity

  20. Which function is used to read input from the user in Python 3?
    Answer: input()

O level m3 r5 mcq questions with answers

  1. Which keyword is used for an infinite loop?
    Answer: while(True)

  2. Which of the following is a logical operator?
    A. and
    B. not
    C. or
    D. All of the above
    Answer: D

  3. What is the correct way to write an if statement in Python?
    Answer: if x > 5:

  4. What is the output of print(10 % 3)?
    Answer: 1

  5. How many times will this loop run? for i in range(0, 3):
    Answer: 3 times

  6. What does str.upper() do?
    Answer: Converts all characters to uppercase

  7. How to get the last item in a list a?
    Answer: a[-1]

  8. list.pop() removes…?
    Answer: Last element

  9. What is the default return type of a function without return?
    Answer: None

  10. Which function returns number of elements in list?
    Answer: len()

  1. Which mode opens a file for reading?
    Answer: ‘r’

  2. What is the output of open('file.txt', 'w')?
    Answer: Opens file for writing (creates if not exists)

  3. What is used to catch exceptions in Python?
    Answer: try-except

  4. What does finally block do?
    Answer: Executes no matter what

  5. Which keyword is used to raise an exception?
    Answer: raise

  6. Dictionary in Python stores data in…?
    Answer: key-value pairs

  7. What is the output of {'a':1, 'b':2}['b']?
    Answer: 2

O Level Python (M3-R5.1)1000+MCQs+PYQs PDF

  1. Which method removes all items from a list?
    Answer: list.clear()

  2. How to add a key-value pair in a dictionary?
    Answer: dict[‘key’] = value

  3. What does set() do?
    Answer: Removes duplicates and stores unordered unique items

  4. What is indentation used for in Python?
    Answer: To define code blocks

  5. Python is a…?
    A. Compiled language
    B. Interpreted language
    C. Assembly language
    D. High-level + compiled
    Answer: B

  6. Python files have extension…?
    Answer: .py

https://www.youtube.com/@olevelguruji

  1. What does continue do in a loop?
    Answer: Skips to next iteration

  2. Which keyword is used to define a class?
    Answer: class

  3. What is the use of pass in Python?
    Answer: It does nothing; a placeholder

  4. What is the output of bool('False')?
    Answer: True

  5. What will list(range(0,10,2)) return?
    Answer: [0, 2, 4, 6, 8]

  6. How to remove a specific item by value from a list?
    Answer: list.remove(item)

  7. What is the correct syntax for importing a module?
    Answer: import module_name

  8. Which data type is used for True/False?
    Answer: bool

  9. What is a lambda function?
    Answer: An anonymous function

  10. Which built-in function returns the largest item?
    Answer: max()

  11. How to comment multiple lines in Python?
    Answer: Use multiple # or triple quotes (''')

  12. What is the output of 3 != 5?
    Answer: True

Check Our Latest Uploads

O level m1 r5 mcq questions pdf

O Level Python (M3-R5.1)1000+MCQs+PYQs PDF

Leave a Comment