Advertisement
Guest User

Untitled

a guest
Mar 29th, 2020
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 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 == "subtract":
  14. print("Let's subtract 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.  
  23. elif command == "multiply":
  24. print(" Let's multiply numbers")
  25. input1 = input("Number 1>")
  26. input2 = input("Number 2>")
  27. number1 = int(input1)
  28. number2 = int(input2)
  29. result = number1 * number2
  30. output = str(result)
  31. print(input1 + "*" + input2 + "=" + output)
  32.  
  33. elif command == "divide":
  34. print(" Let's Divide numbers")
  35. input1 = input("Number 1>")
  36. input2 = input("Number 2>")
  37. number1 = int(input1)
  38. number2 = int(input2)
  39. result = number1 / number2
  40. output = str(result)
  41. print(input1 + "/" + input2 + "=" + output)
  42.  
  43. else:
  44. print("sorry i dont understand")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement