showing result nothing | SoloLearn: Learn to code for FREE!

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/1/2020 1:29:43 PM

Tauhid Anwar

3 Answers

New Answer

+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.

0

You registered a function but you didn't call it