Nov-12-2021, 05:01 PM
What is the homework assignment? What you are doing doesn't make much sense and I wonder which applies:
A) Assignment is weird
B) You don't understand the assignment
C) Your code doesn't reflect the assignment.
Your code will not get past line 8 if the user types "a" when asked to enter the area. Are you supposed to test the input and raise an exception if it can't be converted to a float, or are you supposed to catch the exception and raise a different exception? Either fall into category A) Assignment is weird.
A) Assignment is weird
B) You don't understand the assignment
C) Your code doesn't reflect the assignment.
Your code will not get past line 8 if the user types "a" when asked to enter the area. Are you supposed to test the input and raise an exception if it can't be converted to a float, or are you supposed to catch the exception and raise a different exception? Either fall into category A) Assignment is weird.