Advertisement
Guest User

Untitled

a guest
Mar 29th, 2020
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. print("Hi, i am Nuras, your personal bot.")
  2. command = input("How can i help you >")
  3. if command == "add":
  4. print("Let's add some number")
  5. input1 = input("Number 1>")
  6. input2 = input("Number 2>")
  7. number1 = int(input1)
  8. number2 = int(input2)
  9. result = number1 + number2
  10. output = str(result)
  11. print(input1 + "+" + input2 + "=" + output)
  12.  
  13. elif command == "substract":
  14. print("Let's substract some number")
  15. input1 = input("Number 1>")
  16. input2 = input("Number 2>")
  17. number1 = int(input1)
  18. number2 = int(input2)
  19. result = number1 - number2
  20. output = str(result)
  21. print(input1 + "-" + input2 + "=" + output)
  22. else:
  23. print("sorry i dont understand")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement