Advertisement
xavicano

Untitled

Oct 13th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. print("Hi, I am Marvin, your personal bot.")
  2. command = input("How can I help? ")
  3. if command == "add":
  4.     print("lets add some numbers")
  5.     input1 = int(input("Number 1> "))
  6.     input2 = int(input("Number 2> "))
  7.     result = input1 + input2
  8.     print(input1," + " ,input2," = " ,result)
  9. elif command == "subtract":
  10.     print("lets subtract some numbers")
  11.     input1 = int(input("Number 1> "))
  12.     input2 = int(input("Number 2> "))
  13.     result = input1 - input2
  14.     print(input1," - " ,input2," = " ,result)
  15. else:
  16.     print("sorry I dont understand")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement