Organising Code#
These lessons describe how to write code efficiently by organising it into conditional statements, loops, functions, and importing modules.
When we are talking about for loops more generally we use the following terms:
Discrete variable: a variable changes its value at every iteration of the loop (e.g.
temperature_Cin task 3).Iterator: a variable containing multiple values, which can be used in a
forloop (e.g.temperature_measurementsin the last example). Lists are the most common kind of iterator in Python.