Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Coded by IssacX
- #####################
- #+------+----------+#
- #|Python|Calculator|#
- #+------+----------+#
- #####################
- import math
- print """
- Calculator coded by IssacX
- #####################
- #+------+----------+#
- #|Python|Calculator|#
- #+------+----------+#
- #####################
- """
- def calculate():
- process = raw_input("Are you going to: Add, Subtract, Multiply, or Divide?\n>")
- if process== "add":
- def add():
- print("Enter two Numbers\n")
- a = int(raw_input('A = '))
- b = int(raw_input('B = '))
- c = a + b
- print ('C = %s' %c)
- add()
- elif process == "subtract":
- def sub():
- print("Enter two Numbers\n")
- a = int(raw_input('A = '))
- b = int(raw_input('B = '))
- c = a - b
- print ('C = %s' %c)
- sub()
- elif process == "multiply":
- def mul():
- print("Enter two Numbers\n")
- a = int(raw_input('A = '))
- b = int(raw_input('B = '))
- c = a * b
- print ('C = %s' %c)
- mul()
- elif process == "divide":
- def mul():
- print("Enter two Numbers\n")
- a = int(raw_input('A = '))
- b = int(raw_input('B = '))
- c = a / b
- print ('C = %s' %c)
- mul()
- calculate()
- calculate()
Advertisement
Add Comment
Please, Sign In to add comment