Build a Bill Splitter - Step 4

Tell us what’s happening:

hello, ive tried in many configurations to solve this one. also envoked claude code to anylize, and it seems like this ones impassible. ive tried using ‘F-string’. ive tried seperating into 2 different ‘prints’. ive tried droping the str(). aswell as read the available “hints” and none of them have been helpful

Error
// running tests
2. You should print the string Total bill so far: followed by a space and the value of running_total.
// tests completed
// console output
Total bill so far: 198.82999999999998”

-terminal output

“Total bill so far: 198.82999999999998”

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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36

Challenge Information:

Build a Bill Splitter - Step 4

I got stuck there too. You don’t need to convert the data types, and you don’t need to add a space. The same applies to similar questions just remove the space they asked for and the code should run.

Also remember, we’re not concatenating the arguments. When passing multiple arguments to the print() function, we separate them with a comma.

I hope this helps—happy coding!:slightly_smiling_face:

You are so close and the previous reply has got you on the right track. In python when you print 2 different objects separated by a ((,) comma) there is an implied space that is added by default. drop the current space in your print() call after the colon (:slight_smile: also you cannot concatenate a string and an integer together which is what happens when you use the + operator. just print the two objects separated by a comma I.E.

print(object1(your string:), object2(your integer stored in the variable)

You got this!