NEA Support

Below is a series of different programs that have pseudocode and flowcharts completed for them. Use them to try and relate your algorithm designs to your code.

Example 3 - Average Calculator - For Loop

This program is designed to find the average in a range of numbers.

Flowchart


Pseudocode


Python Code

			
total = 0
numbers = int(input("How many numbers do you want to enter? "))
for x in range(numbers):
    latest = int(input("Enter a number: "))
    total = total + latest
average = total / numbers
print("The total of the numbers was " + str(total))
print("The average of the numbers was " + str(average))