Code to computer results for exercise 5