Tag: Procedure

Standard Form Conversion Algorithm

Standard form (a.k.a. standard index form), is a system of writing numbers which is particularly useful when using either very large or very small numbers. It is based on using powers of 10 to express how big or small a

Radians to Degrees Conversions

The radian is a unit of measure for angles used mainly in trigonometry. It is used as an alternative to degrees. Whereas, in degrees a full circle is 360 degrees, in radians a full circle is 2π radians: It is

Happy New Year Animation

In this challenge we will use Python code to create a text-based (ASCII) animation to be used as a final countdown before the new year! Our countdown timer will be based on a for loop to count down from 5

Water Polo Challenge

In this challenge you are going to use Python code to score a goal in a game of Water Polo. To do so you will use the code given below. You will pass the ball from one player to another

Football Formation

The purpose of this challenge is to understand how subroutines (functions/procedures) are used in Python to create sections of code that can be called/reused many times within a program. Subroutines mean that a section of code can be identified using

Cinema Booking Challenge

A cinema has created a booking system for their main theatre which consists of 48 seats, organised in 6 rows of 8 seats. To store information as to whether a seat is booked or available, the program uses a 2-dimensional

Professor Snape’s Magic Potions

In this challenge we will use file handling techniques to read through and access the content of different text files. We have saved three recipes for the following three magic potions using one text file per recipe: Invisibility Potion: A

Haunted House

You are going to write a Python game where the user walks within the different rooms of a haunted house. In each room, something will happen. You will decide what happens when the user enters a room. You can use

Avatar Generator

In this challenge we will use Python Turtle to create avatars. (An avatar is an icon representing a particular person in a computer game, Internet forum, etc.) Try the code below. This code is using a few computing concepts such

All Stars Football Team

In this challenge we are looking at how a list can be used to store all the players’ names of a football team. Using a set of functions we then manipulate this list to: Find a value in a list