Build a Bill Splitter - Step 4

Tell us what’s happening:

i dont know what going on but it says my code wrong

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/146.0.0.0 Safari/537.36

Challenge Information:

Build a Bill Splitter - Step 4

Hi @chickabello

You are not asked to convert the running_total variable to a string.

Happy coding

The test asks you to use the print(). here is the relevant sentence from the instructions

image

tried it brings an error

if this is what u mean

print("Total bill so far:"+" " + running_total)

dosent work

Hi @chickabello,

Aren’t you seeing this error in the console?

Traceback (most recent call last):
  File "main.py", line 11, in <module>
TypeError: can only concatenate str (not "float") to str

You can do the print() two ways:

print("my string:", myvariable)

or

print(f"my string: {myvariable}")

Happy coding!