SHARE
TWEET

Addition

HollyPepperony Aug 19th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. print("Welcome, I'm Pythy, your personal bot")
  2. command = input("What would you like to do? ")
  3. if command == 'add' or command == 'plus':
  4.     input1 = input('Enter number 1: \r >')
  5.     input2 = input('Enter number 2: \r >')
  6.     number1 = int(input1)
  7.     number2 = int(input2)
  8.     result = number1 + number2
  9.     print(input1 + " + " + input2 + " = " + str(result))
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