I have written this code for my class however I receive error messages. Would anyone be able to spot why I receive these errors: