Build a Bill Splitter - Step 4

Tell us what’s happening:

What is wrong with the code? I checked the instructions and the terminal says I have a syntax error on line 11: “(print)Total bill so far:” I haven’t seen any questions on this workshop so far.

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= abs(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/145.0.0.0 Safari/537.36

Challenge Information:

Build a Bill Splitter - Step 4

What built-in object is abs() a method of? Do you even need that? Use variable names to get the total.

print is a method and is called like this: print('something i want to print goes here')

I was trying to add up the variables with abs( ), after I got an error using the variable names to get the total.

Please post your updated code if you need more help. Thank you.

Will do. This is what the code currently looks like:

You need to use variables (not their assigned values) to get the running_total.

You need to fix your print() statement.

Welcome to the forum @plutato

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge. How to Help Someone with Their Code Using the Socratic Method

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

Happy coding

try to use f-string statement