SHARE
TWEET

Untitled

a guest Dec 8th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. print("Hi. I am Marvin, your personal bot.")
  2. print("Let's make some calculations!")
  3.  
  4. command = input("How can I help you? >> ")
  5.  
  6. if command == "add":
  7.     print("Let's add some numbers.")
  8.     input1 = input("Number 1: >> ")
  9.     input2 = input("Number 2: >> ")
  10.     number1 = int(input1)
  11.     number2 = int(input2)
  12.     result = number1 + number2
  13.     output = str(result)
  14.     print(input1 + " + " + input2 + " = " + output)
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