Midterm (3) Flashcards

1
Q

What is machine language?

A

The only language a CPU understands. Encoded in binary.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the most defining feature of assembly code compared to higher level languages?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

True or False: Flexibility is an advantage of an interpreted style, and compiled languages execute faster.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

If you were editing a Python program and accidentally deleted a “:”, would that cause a syntax or logic/semantic error?

A

syntax

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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?

A

logic/semantic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a pointer?

A

A memory location which holds an address/name of some other memory location

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

True or False: In Python, constants and variables MUST be declared the same way.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

True or False: A # character can be used to turn the rest of a Python line into a comment.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly