0
showing result nothing
def calculate_area(b=5,h=6,shape="triangle"): if shape=="triangle": area=1/2*(b*h) elif shape=="rectangle": area=b*h else: print("***error") area=none return area
3 Respuestas
+ 4
Just do
print(calculate_area(5,6,"triangle"))
The return function returns value but it doesn't print it. You have to use print() for output.
#Typo fix
+ 2
Just do
print(claculate_area(5,6,"triangle"))
The return function returns value but it doesn't print it. You have to use print() for output.