Advertisement
lubattillah

operations

May 11th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. print("Let's do some maths")
  2. a=int(input("enter number1: "))
  3. b=int(input("enter number2: "))
  4. command=input("choose operation: ")
  5. if command=="+":
  6. result=a+b
  7. print(a, "+" ,b, "=",result)
  8. elif command=="-":
  9. output=a-b
  10. print(a, "-" ,b, "=",output)
  11. else:
  12. print("Sorry I dont understand what is this kind of operation")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement