topic : program flow Flashcards

(7 cards)

1
Q

what is a computer program
what does this produce

A

a series of statements executed one after another
writing statements produces constructs

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

constructs can be one type of what three things

A

either an iteration, selection, or sequence

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

what is a sequence

A

executing instructions one after the other

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

what is selection also known as branching (i think but check this on google)

A

following different routes based on the outcome of a decision
by using :
- if
- or if… else

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

what is nesting

A

putting one statement inside another, through iteration or selection

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

what is iteration

A

repeating section of code by using :
- for loops- count controlled loops
- or while loops - condition controlled loops, when the required number of iterations isn’t known
- or a do until loop, a variation of a while loop, when code executes at least once before the condition is checked

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

what are the three parts of every computer program

A

Input – process – output

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