Category: Challenges

Byte Insight

Curiosity 2006

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

Read the following algorithm for the recursive function called Curiosity that needs two integers as inputs and returns an integer value.

In the algorithm, MOD is an operator. It works with two integers to give the remainder when the first integer is divided by the second. This means that

  • 17 MOD 7 is 3
  • 72 MOD 15 is 12

Press Cutting Service

This is a software development task and an implementation task.

A group of Sixth Form students have decided to run a press cutting service for the students in their school. They intend to identify and take cuttings of topics related to each examination subject taught at the school.

They propose to hold basic information about each cutting on a database. Students will be able to access this database.

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.

Area Calculator

In this challenge you should write a program that calculates the area of different shapes. It is a chance for you to practice basic maths inside a program amongst other skills.  I would approach it something like:

  • Create a program that will calculate the area of a rectangle.
  • Use an IF statement to ask the user which shape they would like to calculate the area of.
  • Add an option for a Triangle.
  • Import the maths library and use it to calculate the area of a Circle.
  • At this point you might think about using methods to split your code up into small manageable chunks.

Flowchart Description of the Algorithm.

Extension

Write a program to calculate the surface area of the following shapes: a square, a cube, a pyramid, and a cylinder.  Ask the user which shape he would like to calculate the area for, and the dimensions that are needed for the calculation.

The formulæ for each shape follows.

  • Area of a cube: 6 X (Length of side)2
  • Area of a pyramid: (Number of faces X Length of base X Height) / 2
  • Area of cylinder : 2?Radius X Height

Informatics (00)

Introduction

The sixth year of the UK Informatics Competition organised by Richard Forster and Antony Rix. The students had to complete a series of challenges including Ants and Romulus & Remus. 

Guess The Number

Write a guessing game where the user has to guess a secret number. After every guess the program tells the user whether his number was too large or too small. At the end the number of tries needed should be printed. It counts only as one try if the user inputs the same number consecutively.

Informatics (01)

Introduction

The seventh year of the UK Informatics Competition organised by Richard Forster and Antony Rix. The students had to complete a series of challenges including Friends and Playfair. Click here to view all the competition tasks. ¬© British Informatics Olympiad