Advertisement
lubattillah

addition

May 11th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. print("Hi, I am Khamisi, your personal bot.")
  2. operation=["sum","add","plus","total","+"]
  3. command=input("How can I help? ")
  4. if command in operation:
  5. input1 = input("Number 1> ")
  6. input2 = input("Number 2> ")
  7. number1 = int(input1)
  8. number2 = int(input2)
  9. result = number1+number2
  10. output = str(result)
  11. print(input1+" "+"+"+" "+input2+" "+"="+" "+output)
  12. else:
  13. print("This is how we can add two numbers")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement