Build a Bill Splitter - Step 4

Tell us what’s happening:

I cannot figure out what I’m doing wrong. It keeps telling me to update running_total using the += operator but I can’t see where exactly it wants me to put it. I feel like I’ve already done exactly what the prompt is asking. Not sure at this point.

Your code so far

running_total = 0

num_of_friends = 4

appetizers = 37.89
main_courses = 57.34
desserts = 39.39
drinks = 64.21


# User Editable Region

running_total += appetizers
running_total += main_courses
running_total += desserts
running_total += drinks

print('Total bill so far: ' + str(running_total))

# 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/146.0.0.0 Safari/537.36 Edg/146.0.0.0

Challenge Information:

Build a Bill Splitter - Step 4

Hi @tenzin.deck and welcome to the FCC community!

There are a couple things to notice here. It says that you should update running_total once with all 4 of the variables, not updating 4 times as is being done now.

And in your final print statement, it does not want you to concatenate the value, but rather just print it alongside the “Total bill so far:”

Happy Coding!

2 Likes

Thank you so much! It worked.

1 Like