Sep-13-2017, 08:19 PM
(This post was last modified: Sep-13-2017, 08:28 PM by icantcodeforcrap.)
I have to do a stupid tip calculator hw assignment for my beginning coding class. It's literally only our second assignment, but I'm stuck. For some reason, the program will not calculate the tip. I don't know what I'm doing wrong. It's probably something basic. Here's the input and output.
Input-----------------------------
Oh that's fancy. Sorry, literally just found this site, don't know much about it
Input-----------------------------
tax = .06 # How much is the bill? bill = input("How much is the bill? ") # What percentage of the tip would you like to enter? tippy = input("What percentage of the tip would you like to enter? ") # Tip added print "Tip added is " + str(tippy) # What is the total bill? TotalBill = (bill * tax) + (bill * tippy) + bill print "Your total bill is " + str(TotalBill)Output---------------------------
Output:How much is the bill? 100
What percentage of the tip would you like to enter? 10
Tip added is 0
Your total bill is 106.0
Oh that's fancy. Sorry, literally just found this site, don't know much about it