Paper 2 — Algorithms & Programming · Build and analyse flowcharts from scenarios and code
Design a flowchart from a written scenario involving a decision
A theme park checks the age of every visitor before entry. If the visitor is 12 years old or over, they may enter the park unaccompanied. Otherwise, they must be accompanied by an adult. In both cases, a message is displayed confirming the entry condition, and the process ends.
Both branches merge before the END terminal — this is a key structural feature.
Design a flowchart involving a compound Boolean condition
A cinema system checks whether a customer qualifies for a 50% discount. The discount applies only if the customer is a student OR holds a discount card, AND the day of the week is Sunday. If the condition is met, the ticket price is halved and the discounted price is displayed. Otherwise, the full price is displayed. The system then ends.
The compound AND is handled by two sequential decisions. All three output branches merge before END.
Produce the equivalent flowchart for a Python snippet containing a loop
# Sum integers from 1 to a user-supplied limit total = 0 counter = 1 limit = int(input("Enter limit: ")) while counter <= limit: total = total + counter counter = counter + 1 print("Sum =", total)
Q1. What shape is used to represent the while counter <= limit condition in a flowchart?
Q2. How many process boxes are needed inside the loop body?
Q3. In the flowchart, the "YES" branch of the counter <= limit decision should point…
Q4. After the last iteration, which flowchart element comes immediately after the decision's "NO" branch?
Now draw the full flowchart for the code above on the canvas:
The back-edge (loop arrow) returns from the bottom of the loop body to the decision diamond — this is how iteration is represented in a flowchart.