Build a Bill Splitter: Step 4

Please help, I left a space between the string and the running_total value but it gave me an error. With the comma there was no error but it tells me that I should print the string Total bill so far: followed by a space and the value of running_total.

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: ", str(running_total))

Welcome back, @lissasiz006!

It is only necessary to apply the str() method when you concatenate a variable and a string, not when you print and pass the variable as a second argument.


In the future, if you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Help button located on the challenge.

The Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

Happy coding!

Thank you so much! I got through to the next step! <3