Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Hi, I am Marvin, your personal bot.")
- command = input("How can I help? ")
- if command == "calculate tip" or command == "tip":
- print("lets crunch some numbers")
- input1 = input("Amount paid > ")
- input2 = input("Tip percentage (using a decimal) > ")
- number1 = int(input1)
- number2 = float(input2)
- result = number1 * number2
- output = str(result)
- print(input1 + " * " + input2 + " = " + output)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement