Is Python code compiled or interpreted?
A. Python code is both compiled and interpreted
B. Python code is neither compiled nor interpreted
C. Python code is only compiled
D. Python code is only interpreted
Answer: Option A
Solution (By Examveda Team)
Python code is both compiled and interpreted.When you run a Python script, the source code is first compiled into bytecode by the Python interpreter. This bytecode is then executed by the Python Virtual Machine (PVM). Thus, Python combines elements of both compilation and interpretation. The compilation step translates the human-readable source code into bytecode, while the interpretation step executes the bytecode instructions. This hybrid approach allows Python to achieve a balance between performance and flexibility.
What is Python primarily used for?
A. Web browsing
B. Data analysis
C. Video editing
D. Game development
Who developed Python Programming Language?
A. Wick van Rossum
B. Rasmus Lerdorf
C. Guido van Rossum
D. Niene Stom
Which of the following is an advantage of Python?
A. It compiles to machine code
B. It enforces strict typing
C. It has a large standard library
D. It requires extensive memory management
What is the role of the Python interpreter?
A. To convert Python code to assembly language
B. To manage memory allocation
C. To execute Python code line by line
D. To compile Python code into bytecode

Join The Discussion