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 areahero. The code below results in an error:
NameError: global name 'areahero' is not defined. Rewrite the return statement so that areahero is called correctly.
import triangle
def areasidelength:
number float
Return the area of an equilateral
triangle with sides of length sidelength.
area
return areaherosidelength sidelength, sidelength
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
