Advertisement
Guest User

Untitled

a guest
Oct 15th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.79 KB | None | 0 0
  1. print("Hi, I am Marvin, your personal bot.")
  2. print("enter 1 to multiply")
  3. print("enter 2 divide")
  4. command = input("How can I help? ")
  5. if command == "1":
  6.    print("lets multiply some numbers")
  7.    input1 = input("Number 1> ")
  8.    input2 = input("Number 2> ")
  9. #   input3 = input("Number 3> ")
  10.    num1 = int(input1)
  11.    num2 = int(input2)
  12. #   num3 = int(input3)
  13.    result = num1 * num2
  14.    output = int(result)
  15.    print(output)
  16.    print("multiply")
  17. elif command == "2":
  18.    print("lets divide some numbers")
  19.    input1 = input("Number 1> ")
  20.    input2 = input("Number 2> ")
  21. #   input3 = input("Number 3> ")
  22.    num1 = int(input1)
  23.    num2 = int(input2)
  24. #   num3 = int(input3)
  25.    result = num1 / num2
  26.    output = int(result)
  27.    print(output)
  28.    print("divide")
  29. else:
  30.   print("check again")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement