Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2019
107
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 Marvin, your personal bot.")
  2. command = input("How can I help? ")
  3. if command == "calculate tip" or command == "tip":
  4. print("lets crunch some numbers")
  5. input1 = input("Amount paid > ")
  6. input2 = input("Tip percentage (using a decimal) > ")
  7. number1 = int(input1)
  8. number2 = float(input2)
  9. result = number1 * number2
  10. output = str(result)
  11. print(input1 + " * " + input2 + " = " + output)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement