Advertisement
rjsingletary

Finished command

Nov 15th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. finished=False
  2. while finished==False:
  3. print("Hi, I am Marvin, your personal bot.")
  4. command=input("How can I help you?")
  5. if command == "add":
  6. print("lets add some numbers")
  7. input1=input("Number1> ")
  8. input2=input("Number2> ")
  9. number1=int(input1)
  10. number2=int(input2)
  11. result=number1 + number2
  12. output=str(result)
  13. print(input1 + "+" + input2 +"="+output)
  14.  
  15. elif command == "Bye":
  16. finished=True
  17. print("good night")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement