-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathArea_Calculator.py
34 lines (25 loc) · 1.06 KB
/
Area_Calculator.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#This script was written on 1.30.24 by Lmmp04 for a practical programming class. It features a calculator for the area of a circle, rectangle, or a triangle!
print(". \ L PPPPPP /")
print(r". \\ L P P //")
print(". ===========>> L PPPPPP <<===========")
print(r". // L P \\")
print(". / LLLLLLL P \ ")
def area_rect():
print("Area of a Rectangle")
width = int(input("Enter the width: "))
height = input("Enter the height: ")
print ("The Area of the Rectangle is: ", int(width*height))
area_rect()
def area_circle():
print("The Area of a Circle")
radius = int(input("Enter the radius: "))
eq = 3.14*radius**2
print ("The Area of the Circle is: ", eq)
area_circle()
def area_tri():
print("Area of a Triangle: ")
base = int(input("Enter the base: "))
height = int(input("Enter the Height: "))
eq = (.5*base*height)
print ("The Area of the Triangle is: ", eq)
area_tri()