I'm getting the following error ''expected an indented block'' Where is the failing code?

Posted by user1833814 on Stack Overflow See other posts from Stack Overflow or by user1833814
Published on 2012-11-18T16:24:58Z Indexed on 2012/11/18 17:01 UTC
Read the original article Hit count: 170

Filed under:
import math

def area(base, height):
    '''(number,number) -> number
Return the area of a wirh given base and height.
>>>area(10,40)
200.0
'''
    return base * height / 2

def perimeter(side1, side2, side3):
    '''(number,number,number) -> number
Return the perimeter of the triangle with sides of
length side1,side2 and side3.

>>>perimeter(3,4,5)
12
>>>perimeter(10.5,6,9.3)
25.8
'''
    return (side1 + side2 + side3)


def semiperimeter(side1, side2, side3):
    return perimeter(side1, side2, side3) / 2


def area_hero(side1, side2, side3):

semi = semiperimeter(side1, side2, side3)
area = math.sqrt((semi * (semi - side1) * (semi - side2) * (semi - side3))
    return area

© Stack Overflow or respective owner

Related posts about python-3.x