Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Welcome to the Chugs Calculator")
- print("Your Options are:")
- print()
- print("1) Addition")
- print("2) subtraction")
- print("3) Multiplication")
- print("4) Division")
- print("5) Area of circle")
- print("6) Exit")
- loop=1
- while loop==1:
- choice=input("Choose your option")
- choice=int(choice)
- if choice == 1:
- add1=input("Enter your first number:")
- add2=input("Enter your second number:")
- add1=int(add1)
- add2=int(add2)
- print(add1, "+",add2,"=",add1+add2)
- elif choice== 2:
- sub1=input("Enter your first number:")
- sub2=input("Enter your second number:")
- sub1=int(sub1)
- sub2=int(sub2)
- print(sub1, "-",sub2,"=",sub1-sub2)
- elif choice== 3:
- mul1=input("Enter your first number:")
- mul2=input("Enter your second number:")
- mul1=int(mul1)
- mul2=int(mul2)
- print(mul1, "*",mul2,"=",mul1*mul2)
- elif choice== 4:
- div1=input("Enter your first number:")
- div2=input("Enter your second number:")
- div1=int(div1)
- div2=int(div2)
- print(div1, "/",div2,"=",div1/div2)
- elif choice==5:
- rad1=input("What is the radius of the circle")
- rad1=int(rad1)
- pi=3.1428
- print("Area of circle with radius",rad1,"=",pi*(rad1**2))
- elif choice==6:
- loop=0
- else:
- print("Enter a value from 1 to 5")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement