I\'m writing this little program in Python, I think I did most of it right howev
ID: 3536774 • Letter: I
Question
I'm writing this little program in Python, I think I did most of it right however I can't find in the book on how to calculate the total; #'s are the start of notes and the none number signs are the program, but I'm sure the programming genius who does this for me already knows that :)
So the question is, I need the total bill cost, that is, food_charges+tip_rate+tax_rate with only two decimal places and preceded by a $ sign.
# Name, Class, Assignment, & Date.
# Variables for the following: Food Charges, Tip, Tax, and Total
food_charges = float(input("cost of meal"))
#Tip rate 15%
tip_rate = print(float(food_charges * .15))
# Tax rate 7%
tax_rate = print(float(food_charges * .07))
# Total
Explanation / Answer
#changes in bold
food_charges = float(input("cost of meal"))
#Tip rate 15%
tip_rate = print(float(food_charges * .15))
# Tax rate 7%
tax_rate = float(food_charges * .07))
print tax_rate
# Total
total = food_charges+tip_rate+tax_rate
print ("Total is $%.2f "%total)