Categories: Python
Tags:
Python MCQ Quiz

Python MCQ Quiz - Set 2

1. What is the output of print(3 * 'Python')?
  • A) PythonPythonPython
  • B) Python3
  • C) Error
  • D) Python * 3
Answer: A) PythonPythonPython
2. Which of the following is a mutable data type in Python?
  • A) String
  • B) Tuple
  • C) List
  • D) Set
Answer: C) List
3. What will be the output of bool([])?
  • A) True
  • B) False
  • C) None
  • D) Error
Answer: B) False
4. What is the default return value of a function that does not return anything?
  • A) 0
  • B) None
  • C) Empty String
  • D) Error
Answer: B) None
5. What will be the output of print(type({})) in Python 3?
  • A) <class 'list'>
  • B) <class 'dict'>
  • C) <class 'set'>
  • D) <class 'tuple'>
Answer: B) <class 'dict'>