NEA Support

On the next few pages there are a series of different programs that have pseudocode and flowcharts completed for them. The pseudocode has been colour coded to match each action in the flow diagram. Use them to try and relate your algorithm designs to your code.

Example 1 - Teddy Bears Program - Sequencing

This program is designed to calculate your pay based on the hours worked and the number of teddy bears made.

Flowchart

Pseudocode

Python Code

			#Calculate Hours and Pay
hours = int(input("Enter the number of hours worked: "))
bears = int(input("Enter the number of teddy bears made: "))
hourswage = hours * 7
bearswage = bears * 0.45
total = hourswage + bearswage
print("Your total wage is: £{:.2f}".format(total))