Advertisement
GreatRaymondo

multarechal

May 3rd, 2019
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. print("Hi im Mr Biddle, im your personal bot")
  2. command = input("How can I help? ")
  3. if command == "add":
  4. print("lets add some numbers")
  5. input1 = input("Number 1> ")
  6. input2 = input("Number 2> ")
  7. input3 = input("Number 3> ")
  8. number1 = int(input1)
  9. number2 = int(input2)
  10. number3 = int(input3)
  11. result = number1 + number2 + number3
  12. output = str(result)
  13. print(input1 + " + " + input2 + " + " + input3 + " = " + output)
  14. elif command == "subtract":
  15. print("Lets subtract some numbers")
  16. input1 = input("Number 1> ")
  17. input2 = input("Number 2> ")
  18. number1 = int(input1)
  19. number2 = int(input2)
  20. result = number1 - number2
  21. output = str(result)
  22. print(input1 + " - " + input2 + " = " + output)
  23. elif command == "multiply":
  24. print("Lets multiply some 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. elif command == "area":
  33. print("lets find out the area of this room")
  34. input1 = input("length> ")
  35. input2 = input("width> ")
  36. number1 = int(input1)
  37. number2 = int(input2)
  38. result = number1 * number2
  39. output = str(result)
  40. print(input1 + " * " + input2 + " = " + output)
  41.  
  42. else:
  43. print("sorry I dont have a scooby")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement