m4x1m
February 24, 2026, 8:18pm
1
Tell us what’s happening:
dont know, i tried different ways, gpt didnt help( plz help me
Your code so far
# User Editable Region
running_total = 0
num_of_friends = 4
appetizers = 37.89
main_courses = 57.34
desserts = 39.39
drinks = 64.21
running_total += appetizers
running_total += main_courses
running_total += desserts
running_total += drinks
print("Total bill so far: " + str(running_total))
# User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:147.0) Gecko/20100101 Firefox/147.0
Challenge Information:
Build a Bill Splitter - Step 4
ILM
February 24, 2026, 8:20pm
2
please update the value of running_total summing everything and using only =, not +=
m4x1m
February 24, 2026, 8:22pm
3
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))
same:
// 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
ILM
February 24, 2026, 8:23pm
4
m4x1m:
You should print the string Total bill so far: followed by a space and the value of
write print with two arguments, one being the string, the other running_total
1 Like
dhess
February 24, 2026, 8:28pm
5
Try using a f-string to print.
1 Like
m4x1m
February 24, 2026, 8:28pm
6
ohhh, en not my main lang))
ILM
February 24, 2026, 8:28pm
7
put a comma between the string and the variable
1 Like
cheulie
February 24, 2026, 10:17pm
10
Can you show me what the last line of your of your code is please as I am still getting an error. At the moment I have this:
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))
cheulie
February 24, 2026, 10:20pm
11
So print(“Total bill so far: “ , str(running_total)) as I am still getting an error
cheulie
February 24, 2026, 10:21pm
12
This also gets an error but the output is correct print(“Total bill so far: “ + str(running_total)) as I am still getting an error
ILM
February 25, 2026, 8:14am
14
hi @cheulie , can you please create your own topic?
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.
there is a space in your code in the last string between : and “, delete that space and try again