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

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

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

## Mystery 2005

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

Read the following algorithm for the recursive function called Mystery. X( ) is a one-dimensional array.

## Sith 2006

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

Read the following algorithm, which operates on numbers held in an array Sift, where the size of the array is 10. All of the variables used in the algorithm are integers.

In the algorithm, DIV is an operator that divides one integer by a second integer and truncates the result to its integer part. This means that

• 15 DIV 4 is 3
• 19 DIV 2 is 9