Category: Challenges

Byte Insight

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.

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.

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

Introduction

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.

Examination Centre

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

Read the algorithm below, which validates an Examination Centre number and determines whether it is an overseas or a UK Centre.

The function Len(code) returns the number of characters in code. For example, if code = JA3451,
Len(code) = 6.

The algorithm refers to the one dimensional array err, which has been dimensioned to five cells.

Each output starts on a new line.

Push Pop

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

The following algorithm uses one procedure and five functions.

Mystery 2008

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

Read the following algorithm for the recursive procedure called Mystery.

Where

  • 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.