Build a Bill Splitter - Step 4

Tell us what’s happening:

I’m confused about this problem and am unsure of what’s incorrect here. I’m pretty sure I followed the instructions correctly but still cannot complete the problem. Maybe I can remove the str() from running_total in the print function, but I get an error that I cannot concatenate integers to strings. Can someone help please?

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 + main_courses + desserts + drinks
print('Total bill so far:' + ' ' + str(running_total))

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36

Challenge Information:

Build a Bill Splitter - Step 4

1 Like

Welcome to the forum @hello.jqin !

This should be formatted as: print("string", variable)

You were not asked to apply the str() method.

Happy coding!

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.