Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Area calculation program
- print ("Welcome to the Area calculation program")
- print ("---------------------------------------")
- print
- print ("Please select a shape:")
- print ("1 Rectangle")
- print ("2 Circle")
- = shape
- if shape == 1:
- height = input("Please enter the height: ")
- width = input("Please enter the width: ")
- area = height*width
- print ("The area is", area)
- else:
- radius = input("Please enter the radius: ")
- area = 3.14*(radius**2)
- print ("The area is", area)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement