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
2
Q
Selection (IF)
A
A decision - choosing which lines of instructions to run depending on a condition e.g. is age < 20?
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)
4
Q
Lists in Python: example
A
colours = [“Red”, “blue”, “green”, “purple”]
print(colours)
print(colours[3])
colours.append(“Yellow”)
5
Q
Iteration WHILE: example
A
sentry = “Carry on”
while sentry == “Carry on” :
print(“I’ll keep going”)