Advertisement
Guest User

Untitled

a guest
Dec 15th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1.  
  2. num1 = int(input("Type a number"))
  3. num2 = int(input("And another"))
  4.  
  5. op = input("What operation? >")
  6.  
  7. if op == "+":
  8. ans = num1 + num2
  9. elif op == "-":
  10. ans = num1 - num2
  11. elif op =="/":
  12. ans = num1 / num2
  13. else:
  14. ans = num1 * num2
  15. print(ans)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement