Notes from Book Chapter 1 Flashcards

1
Q

What is the buildig block of a program

A

input:
Get data from the outside outworld.

output:
Display the results of the program on a screen or store them in a file.

sequential execution:
Perform statements one after another in the order they are encountered in the script.

conditional execution:
Check for certain conditions and then execute or skip a sequence of statements.

repeated execution:
Perform some set of statements repeatedly, usually with some variation.

reuse:
Write a set of instructions once and give them a name and then reuse those instructions as needed throughout your program.

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

What is a syntax Error?

A

Syntax errors
These are the first errors you will make and the easiest to fix. A syntax error means that you have violated the “grammar” rules of Python.

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

what is a Logic errors?

A

Logic errors
A logic error is when your program has good syntax but there is a mistake in the order of the statements or perhaps a mistake in how the statements relate to one another.

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

What is a semantic error?

A

Semantic errors
A semantic error is when your description of the steps to take is syntactically perfect and in the right order, but there is simply a mistake in the program.

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

What is a bug?

A

bug
An error in a program.

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

What is the CPU?

A

central processing unit
The heart of any computer. It is what runs the software that we write; also called “CPU” or “the processor”.

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

What is a compiler?

A

compile
To translate a program written in a high-level language into a low-level language all at once, in preparation for later execution.

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

What is a high level language?

A

high-level language
A programming language like Python that is designed to be easy for humans to read and write.

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

what is the interactive mode?

A

interactive mode
A way of using the Python interpreter by typing commands and expressions at the prompt.

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

what is an interpreter?

A

interpret
To execute a program in a high-level language by translating it one line at a time.

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

what is a low level language?

A

low-level language
A programming language that is designed to be easy for a computer to execute; also called “machine code” or “assembly language”.

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

What is the machine code?

A

machine code
The lowest-level language for software, which is the language that is directly executed by the central processing unit (CPU).

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

What is the main memory?

A

main memory
Stores programs and data. Main memory loses its information when the power is turned off.

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

what is parse?

A

parse
To examine a program and analyze the syntactic structure.

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

what is portability?

A

portability
A property of a program that can run on more than one kind of computer.

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

what is the print function?

A

print function
An instruction that causes the Python interpreter to display a value on the screen.

17
Q

what is problem solving?

A

problem solving
The process of formulating a problem, finding a solution, and expressing the solution.

18
Q

what is a program?

A

program
A set of instructions that specifies a computation.

19
Q

what is a prompt?

A

prompt
When a program displays a message and pauses for the user to type some input to the program.

20
Q

What is the secondary memory?

A

secondary memory
Stores programs and data and retains its information even when the power is turned off. Generally slower than main memory. Examples of secondary memory include disk drives and flash memory in USB sticks.

21
Q

what is semantics?

A

semantics
The meaning of a program.

22
Q

what is a semantic error?

A

semantic error
An error in a program that makes it do something other than what the programmer intended.

23
Q

what is a source code?

A

source code
A program in a high-level language.