Category: Challenges

Byte Insight

Magic 8 Ball

The Magic 8 Ball is a toy used for fortune-telling or seeking advice, manufactured by Mattel and developed in the 1950s.  It is often used in fiction, often for humour related to it giving very accurate, very inaccurate, or otherwise statistically improbable answers. You must design and write a program that recreates the Magic 8 Ball experience.

Film Society

A film society has over 300 members who are able to borrow from its library of more than 1000 classic films. There is more than one copy of some films. The films may be held in video cassette form, DVD form, or, in some cases, both.

Members pay an annual membership fee that allows them to borrow films free of charge. Members can only have one film out on loan at a time. Loans are not permitted to extend beyond seven days.

The film society needs a database to contain details of its members, its films and those films currently out on loan.

Dog Year Calculator

A dog that is 5 Years old is equivalent to a 42 year old human.

The human equivalent age is calcuated using the following method:

  • The user inputs the age of the dog in years
  • If the age is 2 or less, the human equivalent is 12 times the age.
  • If the age is more than 2, the human equivalent is 24 for the first 2 years plus 6 for every additional year.

Write a program that converts the age of a dog to the equivalent for a human.

Cellular Automata

Complex behaviour arises out of very simple rules. Here’s a simple set of rules for your “ant” to follow that makes an interesting display. 1. If the ant is on a black square, it turns right 90° and moves forward one unit. 2. If the ant is on a white square, it turns left 90° and moves forward one unit. 3. When the ant leaves a square, it inverts the color.

Etch A Sketch


This challenge is taken from © The Coding Club Python books written by Chris Roffey, which serve as an excellent introduction to Python for younger age groups. The challenge is simple.   Write a Etch A Sketch program that recreates the popular 70s/80s Etch A Sketch toy.

Mystery 2008

This is an algorithm trace task. No implementation is required.

Read the following algorithm for the recursive procedure called Mystery.


  • LEN(aSTRING) returns the number of characters in the string held in aString,
  • MID$(aString, n,m) returns m characters of aString starting at the nth,
  • LEFT$(aString, n) returns the first n characters of aString,
  • RIGHT$(aString, n) returns the last n characters of aString,
  • & joins two strings together (concatenation).

The Pundit

In this task you should use libraries such as Cheetah and Plotly to analyse data for a game or competition producing useful statistics and chats that could be used by a Pundit.

More info to follow.

The Dice Game

The dice simulator and subsequent dice playing game was a Pre-2015 GCSE CS Controlled Assessment task from OCR.   It is probably their most exciting coursework ever and is here so everyone gets a chance.  It also contains hints on completing the CA well.

University Databases

Courses at a university consist of modules. Each module is taught by one or more lecturers and each lecturer teaches at least one module. Each module has a book list consisting of one or more books. A book may be used on more than one module.

Modules have a code and a name. The code consists of two letters followed by 4 digits, for example CP1051 is called An Introduction to Visual Basic.

Each lecturer has a telephone extension number and an office; these may be shared with other lecturers. The telephone extension is a four-digit number and all offices have a five-character identification consisting of two letters and three digits, for example, MU217. Other than the names of lecturers, no personal details of lecturers are to be held.

A database is required that holds details of lecturers, modules and books. It has already been decided to hold the data in the following five tables.

  • Lecturer – holds details of each lecturer.
  • Module – holds details of each module.
  • LecturerModule – acts as a link between the Lecturer and Module tables. Book – holds details of each book.
  • ModuleBook – acts as a link between the Module and Book tables.

Sith 2005

This is an algorithm trace task. No implementation is required.

Read the following algorithm.