Untitled
unknown
plain_text
2 years ago
921 B
6
Indexable
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()
Editor is loading...