Tag: Function

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

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

Area Calculator

For this challenge we are going to use a Python script to calculate the area in square meters of two different flats. To do so we will write a computer program that will add up all the areas of each