Question: Simple Error Handling It is likely that as you were interacting with the GPACalculator program you encountered some runtime errors depending on the input values
Simple Error Handling It is likely that as you were interacting with the GPACalculator program you encountered some runtime errors depending on the input values you tried to enter. Taking a closer look at our program we would notice that we do not have any form of error checking and handling in our code. The closest thing we have is the if statements in the getLetterGradeValue that return -1 when an entered letter does not match any of our letter grades to points mapping. Let's try and see how our program behaves when we don't give it the values it expects and can handle properly.
Step by Step Solution
3.53 Rating (167 Votes )
There are 3 Steps involved in it
CODE IN PYTHON def getLetterGradeValuelettergrade grademapping A 40 B 30 C 20 D 10 F 00 ... View full answer
Get step-by-step solutions from verified subject matter experts
