Advertisement
Guest User

calc.py

a guest
Oct 25th, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. while True:
  2.     num1 = input("first number: ")
  3.     num2 = input("second number: ")
  4.  
  5.     operator = input("operator: ")
  6.  
  7.     thestring = num1 + operator + num2
  8.  
  9.     print(eval(thestring))
  10.     input("Press enter to go again or Control-C to quit.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement