Build a Bill Splitter - Step 4

Tell us what’s happening:

Update the running_total variable by adding appetizers, main_courses, desserts, and drinks together.

Finally, use print() to display the string Total bill so far: followed by a space and the value of running_total.
What am I doing here?

Your code so far

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:' +str(running_total))

num_of_friends = 4




# User Editable Region



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

Challenge Information:

Build a Bill Splitter - Step 4

you are asked to print the string followed by a space and then the running_total, try print("string", variable) or with an f-string

Please what am I doing wrong?

Welcome to the forum @khanalranjit1 !

In the future, please create your own topic when you have specific questions about your own challenge code. Only respond to another thread when you want to provide help to the original poster of the other thread or have follow up questions concerning other replies given to the original poster.

The easiest way to create a topic for help with your own solution is to click the Ask for Help button located on each challenge. This will automatically import your code in a readable format and pull in the challenge url while still allowing you to ask any question about the challenge or your code.

Thank you.

You were not asked to use the “+=” operator to assign to running_total.

1 Like