Build a Bill Splitter - Step 4

Tell us what’s happening:

When using the operator += with the running_total it comes back with the error that I’m not using the operator +=. I’ve used the print() for the running_total and it comes back running but if I add the Total bill so far: in to the space after print it comes back with an error

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+= 37.89 + 57.34 + 39.39 + 64.21
print (Total bill so far: 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

Challenge Information:

Build a Bill Splitter - Step 4

You should use names of variables instead of numbers and you are missing quotes around the string in print()

1 Like

That worked, thank you