Python Forum
Manually raising two error types with a function that computes sqfeet to sqmeters
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Manually raising two error types with a function that computes sqfeet to sqmeters
#8
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.
Reply


Messages In This Thread
RE: Manually raising two error types with a function that computes sqfeet to sqmeters - by deanhystad - Nov-12-2021, 05:01 PM
Raising Errors - by sean1 - Nov-12-2021, 01:30 AM
RE: Raising Errors - by deanhystad - Nov-12-2021, 02:50 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  a generator that computes squares of first 20 natural numbers mdshamim06 1 8,991 Oct-01-2019, 10:38 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020