PRACTICE • LEARN • GROW
Module 1: Introduction to Python - Final Quiz MCQs
Solve topic-wise placement questions and improve your skills.
Module 1: Introduction to Python - Final Quiz Progress
0 of 11 completed
0%
Topic Track
You are viewing MCQs in preview mode. Log in to select options, submit answers, and track your progress.
Log In to Answer
1
Who created the Python programming language in 1991, and what core design principle guided its development?
A.
Dennis Ritchie, designed for low-level operating system memory control
B.
Guido van Rossum, designed around the principle that 'code is read far more often than it is written'
C.
James Gosling, designed for interactive television appliances
D.
Bjarne Stroustrup, designed for high-performance zero-cost abstractions
Explanation & Key
Correct Answer:
2
Which command executed inside an interactive Python interpreter displays 'The Zen of Python' (PEP 20)?
A.
python --zen
B.
import zen
C.
import this
D.
help(philosophy)
Explanation & Key
Correct Answer:
3
How does Python define code blocks (such as bodies of functions, loops, and conditional statements) compared to C or Java?
A.
Using curly braces { } around statements
B.
Using BEGIN and END keywords
C.
Using leading whitespace (indentation) as the syntactic grammar of the language
D.
Using semicolons at the end of each block
Explanation & Key
Correct Answer:
4
What will be the output order when executing this Python script?
print("A")
def test():
print("B")
print("C")
test()
A.
A B C
B.
A C B
C.
B A C
D.
A C
Explanation & Key
Correct Answer:
5
What is the role of the Python Virtual Machine (PVM) in the Python execution lifecycle?
A.
It converts C++ code into Python code ahead of time
B.
It is an evaluation loop inside the interpreter that reads compiled bytecode instructions one by one and executes them
C.
It formats source code according to PEP 8 standards automatically
D.
It compiles Python source code directly to physical x86 CPU machine code
Explanation & Key
Correct Answer:
6
Where does CPython store cached compiled bytecode to speed up subsequent launches of imported modules?
A.
In the Windows Registry
B.
Inside a hidden __pycache__ directory as .pyc files
C.
In the system /tmp partition
D.
Inside the Python root installation directory
Explanation & Key
Correct Answer:
7
What happens if a developer mixes tabs and spaces within the same code block in Python 3?
A.
The interpreter automatically converts all tabs to 4 spaces
B.
The interpreter raises a fatal TabError before running the script
C.
The code runs with a deprecation warning
D.
The code is ignored silently
Explanation & Key
Correct Answer:
8
What does REPL stand for in the context of interactive programming?
A.
Run-Execute-Parse-Loop
B.
ReadโEvalโPrint Loop
C.
Recursive-Evaluation-Python-Language
D.
Remote-Execution-Protocol-Link
Explanation & Key
Correct Answer:
9
Which programming paradigms are directly supported by Python out of the box?
A.
Procedural only
B.
Object-Oriented only
C.
Multi-paradigm: Procedural, Object-Oriented, and Functional
D.
Pure functional without mutable variables
Explanation & Key
Correct Answer:
10
What primary memory management technique does the standard CPython runtime use to reclaim memory?
A.
Manual free() calls like C
B.
Reference Counting supplemented by a Generational Cycle-Detecting Garbage Collector
C.
Stop-the-world Mark-and-Sweep exclusively
D.
Compile-time linear type ownership like Rust
Explanation & Key
Correct Answer:
11
What is the Global Interpreter Lock (GIL) in standard CPython?
A.
A security feature that prevents unauthorized network sockets
B.
A mutex lock that prevents multiple native threads from executing Python bytecode simultaneously, protecting CPython memory structures
C.
A file lock placed on script.py to prevent concurrent editing
D.
A compiler optimization that speeds up mathematical loops
Explanation & Key
Correct Answer:
Question Palette
Answered
Current
Not Attempted
Wrong