Build a Bill Splitter - Step 6

Tell us what’s happening:

I am stuck on Step 6:
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:’, running_total)

tip = running_total * 0.25
print(‘Tip amount:’, tip)

print(‘Total with tip:’, running_total + tip)

Your code so far

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:', running_total)

tip = running_total * 0.25
print('Tip amount:', tip)

# User Editable Region


print('Total with tip:', running_total + tip)

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36

Challenge Information:

Build a Bill Splitter - Step 6

Here are some debugging steps you can follow. Focus on one test at a time:

  1. Are there any errors or messages in the console?
  2. What is the requirement of the failing test?
  3. Check the related User Story and ensure it’s followed precisely.
  4. What line of code implements this?
  5. What is the result of the code and does it match the requirement? (Write the value of a variable to the console at that point in the code if needed.)

If this does not help you solve the problem, please reply with answers to these questions.

I don’t seem to get it, tried different actions, but no progress. Stucked on Step 6 :frowning:

Re-read the instructions again. You’re missing what this step is trying to teach.

I should implement += but I am not sure how.

print(‘Total with tip:’, {running_total += tip}) (I am not sure on how to implement +=)

I could solve it :slight_smile: Thank you!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.