Midterm (3) Flashcards
What is machine language?
The only language a CPU understands. Encoded in binary.
What is the most defining feature of assembly code compared to higher level languages?
There is usually a 1-to-1 correspondence between an assembly statement and the binary machine code it corresponds to. Higher level languages need to go through more conversion steps first.
True or False: Flexibility is an advantage of an interpreted style, and compiled languages execute faster.
True
If you were editing a Python program and accidentally deleted a “:”, would that cause a syntax or logic/semantic error?
syntax
If a program asks the user for an integer and the user responds with “dfdfdfdf” and this causes the program to bomb, would this be a syntax or a logic/semantic error?
logic/semantic
What is a pointer?
A memory location which holds an address/name of some other memory location
True or False: In Python, constants and variables MUST be declared the same way.
True
True or False: A # character can be used to turn the rest of a Python line into a comment.
True