Assignment, Variables, Constants & Sequences
Inputs, Outputs & Type Conversion
Condition controlled Loops
Count Controlled loops
Nested Selection and Iteration
Subroutines 1 - Procedures
Subroutines 2 - Functions
Operators and Operations
Structured Programming
Validation and verification
Good notes will help you organise and process data and information
There are two major types of loops in Python, for loops and while loops. If you want to repeat a certain number of times (definite count), you will normally use a for loop.
For example, a for loop can be used to print all student records since the computer knows exactly how many students there are.
for variable in range(number): indented code goes here...
For loops will iterate through a sequence of numbers using the "range" function. The range function allows you to specify up to three values
range(start value, stop value, step value)
Below is an example of a for loop using the range function with the start value set to stop value set to and the step value set to 1 (it increases by 1 each time).
You can use the range function in a for loop to print out numbers within a range you decide by setting both the start value and the stop value.
For example:
Why 8 and not 7? Well because our range will stop when it gets to the stop value
Python example:
Lets look at the learning outcomes and decide which one best describes our current level of understanding :
Tick the one you feel is closest to your level
AQA Computer Science Tutor
Python Syntax