Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- finished = False
- while finished == False:
- print("Hi, I am Eley, your personal bot.")
- command = input("If you want to add two numbers write 'add' or 'plus': ")
- if command == "add" or command == "plus":
- print("Let's add some numbers:")
- input1 = input("Number 1> ")
- input2 = input("Number 2> ")
- number1 = int(input1)
- number2 = int(input2)
- result = number1 + number2
- output = str(result)
- print("The result of the sum: " + input1 + " + " + input2 + " = " + output)
- elif command == "bye" or command == "stop":
- finished = True
- else:
- print("Sorry your entry is wrong.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement