Quickpaste.it
Create Paste
Top Pastes
Recent Pastes
Settings
Account
Untitled Paste
Created By
Anonymous
Expires never
Raw
Download
0
def square(): s=int(input("Enter side of the square:")) a=s*s print("The area of cube is ",a) def rectangle(): l=int(input("Enter the length of the rectangle:")) b=int(input("Enter the breadth of the rectangle:")) a=l*b print("The area of the rectangle is ",a) def circle(): r=float(input("Enter radius of the circle:")) a=3.14*r*r print("The area of the cycle is ",a) def triangle(): b=float(input("Enter breadth of the triangle:")) h=float(input("Enter height of the triangle:")) a=1/2*b*h print("The area of triangle is ",a) def main(): ch=0 while (ch!=6): print("\n1.Square\n2.Rectangle\n3.Circle\n4.Triangle\n5.Exit") ch=int(input("\nEnter the choice:"))if ch==1: square() elif ch==2: rectangle() elif ch==3: circle() elif ch==4: triangle() elif ch==5: print("Thank You !!!!") else: print("Invalid choice !!!")