Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- greeting = "Welcome to the calcuator\n"
- print(greeting)
- print("1. addition\n")
- print("2. subtraction\n")
- print("3. multiplication\n")
- print("4. division\n")
- choice = int(input("Please make a selection: "))
- if(choice == 1):
- a = int(input("first #: "))
- b = int(input("secound #: "))
- sum = a + b
- print(sum)
- if choice == 2:
- c = int(input("first #: "))
- d = int(input("secound #: "))
- subtraction = c - d
- print(subtraction)
- elif choice == 3:
- e = int(input("first #: "))
- f = int(input("secound #: "))
- multiplication = f * e
- print(multiplication)
- elif choice == 4:
- g = int(input("first #: "))
- h = int(input("secound #: "))
- division = h / g
- print(division)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement