The answersDownload the PDF
Worksheet

F5.2 Flowcharts

Algorithms · GCSE · OCR J277 2.1.2, AQA 8525 3.1.1, Edexcel 1CP2 1.2.1 · about 15 min

BugBotLab
NameClassDate

What this lesson is about

The standard symbols, and turning a flowchart into code.

Questions 5 marks in all

  1. [1 mark]Which flowchart symbol is used for a decision?

    1. AA diamond
    2. BA rectangle
    3. CA rounded box
    4. DA slanted box
  2. [1 mark]Which symbol is used for input or output?

    1. AA slanted box (parallelogram)
    2. BA diamond
    3. CA rectangle
    4. DA box with double sides
  3. [1 mark]In a flowchart, an arrow goes back up to an earlier decision. What does that become in code?

    1. AA while loop
    2. BAn if with no loop
    3. CA function
    4. DA comment
  4. [1 mark]What is the box with double lines on its sides for?

    1. AA subroutine defined elsewhere
    2. BA decision
    3. CThe start of the flowchart
    4. DA variable
  5. [1 mark]The rising scale flowchart starts with count = 0 and loops while count < 5, adding 1 each time. How many notes does it play?

The task: the password guard

Turn this flowchart into a program. Ask for a password with the prompt Password? . While it is not bugbot, print wrong, beep, and ask again. When it is right, turn the LED green and drive forward 20 cm. The task types robot first, then bugbot.

# the two lines every program starts with: the commands, then the robot
from bugbot import *
connect()

password = input("Password? ")

Plan your program here, then type it in and press Run.

QR code
Do it on the robot
www.bugbotlab.com/learn/f5-2-flowcharts/
The simulator checks it and tells you when it passes. Nothing to install, no account.

Challenges

  1. Draw a flowchart for the parking sensor from lesson F2.8.
  2. Draw a flowchart for an algorithm that asks for two numbers and outputs the larger.
  3. Change the guard so it gives up after three wrong passwords. What must be added to the flowchart?