A rollercoaster can take 8 people at one time.
As people queue up and step forward, if they are shorter than 1.2m, they cannot continue because of safety. They are rejected.
Otherwise the rider is accepted and the number of riders is incremented.
When 8 riders are safely on the rollercoaster, the system displays the number of rejected riders.
Look at the algorithm described by a flowchart above.
Code this system.
Decide which variables are needed to store data.
Remember that the whole process can only be repeated 8 times.
However note that there are 2 loops inside the algorithm.
What problems did you have coding the system?
Do you think it is possible to fix these problems using a high level programming language like Python?
sodarun iteratecompile sequence syntax count-controlled loop loop countIF-THEN-ELSE-END IF