Question: A developer has been receiving unexpected error messages on the 3 rd function call when running their python program. Looking at the code below, what

 A developer has been receiving unexpected error messages on the 3

A developer has been receiving unexpected error messages on the 3 rd function call when running their python program. Looking at the code below, what might be the issue? \#area of a rectangle formula def findrectanglearea(base, height): if base s 0 or height \&= 0 : print("Please provide only positive values") \# try/catch block to perform input validation try: base = float (base) height = float (height) area = base * height except: print("Please provide a valid input") \# Test the function to find the area of a rectangle findrectanglearea( 3,10) findrectanglearea( 17,4) findrectanglearea('foo', 'bar') The if conditional is not within the try/except block The developer is lacking sleep and needs more coffee to spot the typo

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!