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

A developer has been receiving unexpected error messages on the 3rd 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  

There is no `return area` statement

The if conditional is not within the try/except block

The function needs to cast str inputs to int

The developer is lacking sleep and needs more coffee to spot the typoA developer has been receiving unexpected error messages on the 3rd function

A developer has been receiving unexpected error messages on the 3rd 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 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') There is no 'return area' statement The if conditional is not within the try/except block The function needs to cast str inputs to int 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!