54.4k views
3 votes
True or False:
A compiled Python file with a *.pyc extension is in binary machine language.

1 Answer

3 votes

Final answer:

A compiled Python file with a .pyc extension contains bytecode, not binary machine language. It is a lower-level representation than source code but requires a Python Virtual Machine to execute.

Step-by-step explanation:

False: When a Python file is compiled, it gets translated into bytecode, which is a platform-independent, low-level representation of the source code. This bytecode is saved with a .pyc extension. While bytecode is closer to machine language than high-level source code, it is not binary machine language itself. Instead, bytecode requires a Python interpreter, such as the Python Virtual Machine (PVM), to execute. Binary machine language, on the other hand, consists of binary code understood directly by a computer's CPU without the need for an intermediary.

User Abhisek
by
7.8k points