Question: Recall that triangle.py defines a function named area _ hero. The code below results in an error: NameError: global name 'area _ hero' is not

Recall that
triangle.py defines a function named area_hero. The code below results in an error:
NameError: global name 'area_hero' is not defined. Rewrite the return statement so that area_hero is called correctly.
import triangle
def area(sidelength):
'.'(number) float
Return the area of an equilateral
triangle with sides of length sidelength.
area (5)
10.825317547305483
'''
return area_hero(sidelength, sidelength, sidelength)
 Recall that triangle.py defines a function named area_hero. The code below

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!