Module 1 · Answers

Answers & explanations

Section A — Easy

01
(a) Breaking a problem into smaller, easier parts. (b) Hiding unimportant detail; focusing only on what matters. (c) Spotting parts of a problem that repeat or are similar.
02
Rectangle = process. Diamond = decision. Parallelogram = input/output. Rounded rectangle = start/end.
03
def
04
Draws an equilateral triangle (3 sides of 50, turning 120° each time).

Section B — Medium

05
Example: 1) Fill the kettle with water. 2) Boil the kettle. 3) Put a tea bag in a mug. 4) Pour boiling water into the mug. 5) Wait, then remove the bag. 6) Add milk/sugar.
06
for i in range(5):
    t.forward(100)
    t.right(72)
5 sides × 72° = 360°, so this draws a regular pentagon.
07
def draw_triangle(size):
    for i in range(3):
        t.forward(size)
        t.left(120)
08
INPUT number
IF number > 0 THEN
    OUTPUT "Positive"
ELSE IF number < 0 THEN
    OUTPUT "Negative"
ELSE
    OUTPUT "Zero"
END IF

Section C — Hard

09
for i in range(4):
    draw_square(40)
    t.penup()
    t.forward(40 + 50)   # square width + gap
    t.pendown()
After each square, lift the pen, move along, drop the pen and draw the next.
10
def draw_polygon(sides, size):
    angle = 360 / sides
    for i in range(sides):
        t.forward(size)
        t.right(angle)

draw_polygon(6, 60)   # hexagon
11
Flow chart should show: Start → Input password → Decision diamond "correct?" → Yes → Output "Welcome" → End. → No → loop back to Input password.
← Back Practice Next → All modules