Tell us what’s happening:
You should use the round() function to round final_bill to two decimal places and assign the result to your each_pays variable.
I am baffled how to arranged the assignments here.. but I got the right output, right?
Your code so far
running_total = 0
num_of_friends = 4
appetizers = 37.89
main_courses = 57.34
desserts = 39.39
drinks = 64.21
running_total += appetizers + main_courses + desserts + drinks
print('Total bill so far:', running_total)
tip = running_total * 0.25
print('Tip amount:', tip)
running_total += tip
print('Total with tip:', running_total)
final_bill = running_total / num_of_friends
print('Bill per person:', final_bill)
# User Editable Region
each_pays = round(final_bill)
round(final_bill, 4)
print('Each person pays:', each_pays)
# User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0
Challenge Information:
Build a Bill Splitter - Step 8