well... it seems like you want the end result to be a full number like $45 instead of $44.8
so this chunk of code in the beginning
CODE
float(raw_bill)
raw_bill= int(raw_bill)
raw_bill= 0.00+raw_bill
is where your problem is happening.
The first line i posted up there is kinda useless...
and if you want it to be a float... then why in the second line do you make it into an integer?
and the third line dosent make much sense either..
I just did this... the end result is an integer... but you can fix that preety easily. The reason it wasnt working is because of the three lines above...
but here is something that works. if you need anymore help just ask. This is a preety easy script to tinker with:
CODE
### Restaurant Tipper Program
### Calculates total amount of bill including a 15% tip
print "Hello there!" \
" This program calculates total amount" \
" of bill you need to pay including a 15% tip" \
" So please enter your total bill amount and I will" \
" give you your total bill."
raw_bill= raw_input("Bill Total Amount: ")
x = float(raw_bill)
tip_amt= x*.15
tip_amt=int(tip_amt)
print "Your tip for the inputted bill is", tip_amt, "dollars."
total_bill= x + tip_amt
total_bill= int(total_bill)
print "Your total bill, including the tip of", tip_amt, " dollars is", \
total_bill, \
"dollars."
raw_input("Press enter key to exit")
i hope i helped you a bit.
This post has been edited by xZachtmx: 14 Jun, 2009 - 03:54 PM