Advertisement
HollyPepperony

Addition

Aug 19th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  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))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement