2.4.3 Write and interpret code that uses selection (branching) Flashcards
1
Q
Fill The Blank:
In early versions of ……….. there was no …….. statement and developers had to use …………… mapping
A
Python, Case, Dictionary
2
Q
Define:
Dictionary
A
Iterable data structure built in to Python that contains a series of values with corresponding keys
3
Q
State:
3 uses of iteration
A
- Adding numbers
- Repeating functions
- Cycling through values
4
Q
State:
Statement used to force a loop to stop (even if a condition is true)
A
break
5
Q
State:
How to run a block of code after a for or while loop has been completed - that is not needed because it continues anyway
A
else:
6
Q
State:
Statement used to stop the current iteration and continue with the next iteration
A
continue