The answersDownload the PDF
Worksheet

F13.9 Project: the revision robot

Exam preparation · GCSE · OCR J277 2.2.1, AQA 8525 3.2.2, Edexcel 1CP2 6.1.3 · about 25 min

BugBotLab
NameClassDate

What this lesson is about

A robot that asks you questions, marks your answers and tells you what to revise.

Questions 5 marks in all

  1. [1 mark]Why does the marker lower and strip both answers before comparing?

    1. ASo capitals and stray spaces do not count as wrong
    2. BTo make it faster
    3. CBecause input() returns a number
    4. DTo sort them
  2. [1 mark]How does the program know which topic to tell you to revise?

    1. AIt counts the wrong answers per topic and names the highest
    2. BIt picks the first topic
    3. CIt asks you
    4. DIt uses the longest question
  3. [1 mark]What kind of revision is this program?

    1. ARetrieval practice
    2. BRe-reading
    3. CHighlighting
    4. DCopying
  4. [1 mark]What does this program print?

    def same(a, b):
        return a.strip().lower() == b.strip().lower()
    print(same(' SMTP ', 'smtp'), same('IMAP', 'smtp'))
  5. [1 mark]Asking the wrong ones again at the end of the quiz is an example of what?

    1. AMore retrieval practice on the questions you find hardest
    2. BSpacing, because it comes days later
    3. CCramming a whole topic
    4. DHighlighting

The task: the revision robot

Ask every question in BANK in turn. For each one, print [<topic>] <question>, read the answer with input(), and mark it ignoring capitals and spaces at the ends. Print right for a correct answer, or wrong, it is <answer>. Play a 880 Hz note for right and 220 Hz for wrong, each 0.2 seconds. At the end print score: <n> of <total> and revise: <topic>, the topic with the most wrong answers, then set the LED green if you scored more than half and red if not. The answers are typed for you.

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

BANK = [
    {"topic": "Networks", "q": "What does DNS turn a domain name into?", "a": "an IP address"},
    {"topic": "Data", "q": "How many bits in a byte?", "a": "8"},
    {"topic": "Networks", "q": "Which protocol sends email?", "a": "SMTP"},
    {"topic": "Security", "q": "What does a firewall check?", "a": "traffic"},
]

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

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

Challenges

  1. Ask the wrong ones again at the end, until they are all right.
  2. Add your own questions from your weakest topic, and run it before school.
  3. Save the score to a file each time, so you can see whether you are improving.