Summary Flashcards

1
Q

What does the term sequence mean?

A

The order the code should run; if not in the correct order the program won’t do what it is supposed to do

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

Selection (IF)

A

A decision - choosing which lines of instructions to run depending on a condition e.g. is age < 20?

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

Lists in Python

A

A data structure in Python to store a collection of data times groups under the same name.
(first item is index 0, square brackets are used)

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

Lists in Python: example

A

colours = [“Red”, “blue”, “green”, “purple”]
print(colours)
print(colours[3])
colours.append(“Yellow”)

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

Iteration WHILE: example

A

sentry = “Carry on”
while sentry == “Carry on” :
print(“I’ll keep going”)

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