Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
921 B
2
Indexable
Never
def area_triangle():
    base = int(input("Enter the base: "))
    height = int(input("Enter the height: "))
    area = base * height * 0.5
    print("The area is: " , area)
    	
area_triangle()

def area_square():
    side = int(input("Enter side: "))
    area = side * side
    print("The area of the square is: " , area)

area_square()

def rectangle():
    base = int(input("Enter the base: "))
    height = int(input("Enter the height: "))
    area = base * height
    perimeter = base * 2 + height * 2
    print("The area of the rectangle is: ", area)
    print("The perimeter of the rectangle is: ", perimeter)

rectangle()


def area_circle():
    radius = int(input("Enter the radius: "))
    perimeter = radius * 2 * 3.14
    area = radius * radius * 3.14
    print("The area of the circle is: ", area)
    print("The perimeter of the circle: ", perimeter)


area_circle()