Python Programming Flashcards
1
Q
Define sequence.
A
Code running line by line on the order it was written.
2
Q
Define selection.
A
Running code based on a conditional statement.
3
Q
Define iteration.
A
Repeating a selection of code in sequence, until a condition has been met.
4
Q
Define variable.
A
Stored data that is referenced by an identifier (name).
5
Q
Define algorithm.
A
A process of set rules to be followed in calculations.
6
Q
What do you call it if something is set as ==True or False?
A
The ‘boolean’.
7
Q
What are common issues with code?
A
- Correct number of brackets.
- Spelling of functions (e.g. ‘Print’ rather than ‘print’).
- Correct placement of speech marks for strings.
- Use of colons (:) at the end of selection and iteration conditions.
- Indentation.
- Placement of code (e.g. not to place random number generation in a loop unless designed).