Unit 1 MCQ Python Without Answer
Unit 1 MCQ Python Without Answer
Problem Definition
Program Design
Flowcharts
Algorithms
Miscellaneous
Python Versions
11. What major change was introduced in Python 3.x compared to Python 2.x?
a) Removal of print as a statement
b) Inclusion of type hints
c) New syntax for loops
d) Faster execution
12. What is the latest Python version (as of 2025)?
a) Python 3.9
b) Python 3.10
c) Python 3.11
d) Python 3.12
13. When was Python 3.x released?
a) 2000
b) 2005
c) 2008
d) 2010
14. What feature was introduced in Python 3.6?
a) F-strings for formatted string literals
b) Print as a function
c) List comprehensions
d) Dictionaries
15. Which of the following is deprecated in Python 3.x?
a) Raw_input()
b) Input()
c) Open()
d) Len()
Python Basics
21. What is the correct syntax for using the print function in Python 3?
a) print "Hello"
b) print("Hello")
c) echo "Hello"
d) Print("Hello")
22. What does the sep parameter in print do?
a) Separates lines of text
b) Specifies the separator between arguments
c) Adds a newline
d) Formats strings
23. What is the default value of the end parameter in print?
a) A space
b) A tab
c) A newline (\n)
d) None
24. How can you print without a newline at the end?
a) Use end=" " in the print statement
b) Use sep=""
c) Use newline=False
d) Use no_newline=True
25. What is the output of print("A", "B", sep="-")?
a) A B
b) A-B
c) A B-
d) -A-B
Error Handling with print
Miscellaneous
36. Which tool is commonly used for breaking down complex problems?
a) Editor
b) Debugger
c) Flowchart
d) Compiler
37. Which of the following is an iterative process in problem-solving?
a) Debugging
b) Refining the algorithm and design after testing
c) Choosing a programming language
d) Writing documentation
38. The role of abstraction in problem-solving is to:
a) Eliminate errors in programming
b) Focus on the main problem while ignoring unnecessary details
c) Make the problem more complex
d) Avoid modularity
39. What is the role of testing in problem-solving?
a) To debug only minor errors
b) To validate the correctness and performance of the solution
c) To rewrite the problem definition
d) To replace program design
40. Which is NOT an objective of program design?
a) Simplicity
b) Scalability
c) Ambiguity
d) Efficiency