daily pastebin goal
26%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2019 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. print("Greetings! I am Samwise, your personal Bot.")
  2. command = input("How can I assist? ")
  3. if command == "add":
  4.     print("lets add some numbers ")
  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 + " plus " + input2 + " = " + output)
  12. elif command == "subtract":
  13.     print("lets subtract some numbers ")
  14.     input1 = input("Number 1>")
  15.     input2 = input("Number 2>")
  16.     number1 = int(input1)
  17.     number2 = int(input2)
  18.     result = number1 - number2
  19.     output = str(result)
  20.     print(input1 + " - " + input2 + " = " + output)
  21. elif command == "divide":
  22.     print("Lets divide some numbers ")
  23.     input1 = input("Number 1>")
  24.     input2 = input("Number 2>")
  25.     input3 = input("Number 3>")
  26.     number1 = int(input1)
  27.     number2 = int(input2)
  28.     number3 = int(input3)
  29.     print("now add in some multiplication")
  30.     result = number1 / number2 * number3
  31.     output = str(result)
  32.     print(input1 + " divided by " + input2 + " times " + input3 + " = " + output)
  33. else:
  34.     print("Would you like some tea instead?")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top