All Coursework

Coursework 2 -- Functions, Files, Words and Coins

In this coursework you will be writing Python functions to perform various computations.

To create these functions you will use Spyder (or some other program editing software if you prefer) to edit the template file cw2.py. This contains the names of the functions you need to define. Do not change the name of this file or the names of functions in the file, otherwise it will cause difficulty for marking your code and you will lose marks.

Questions

There are a total of 24 marks for this coursework, or 20 marks for IFY students, who do not need to attempt part (f). The percentage contribution to your overal grade depends on the module you are taking and is specified in the Assessment section of the Minerva pages for your module.

CW2 Tester Module

You should use the following testing program to check your code prior to submission. You just need to run or import this module when you are in the same directory as your program file, cw2.py.
You can either: