freeCodeCamp/freeCodeCamp

Add alternate solution to "Build A Bill Splitter" Step 4 Workshop

Fechada

#67.442 aberto em 17 de mai. de 2026

 (3 comentários) (0 reação) (1 responsável)TypeScript (44.572 forks)batch import
help wantedscope: curriculum

Métricas do repositório

Stars
 (444.744 estrelas)
Métricas de merge de PR
 (Mesclagem média 6d 11h) (253 fundiu PRs em 30d)

Description

Describe the Issue

I had a recent subreddit post about this step. The student had generated the exact output through what I thought was a reasonable solution (see below), but it was not accepted by this challenge's tests.

I propose adding it as an acceptable solution.

Affected Page

https://www.freecodecamp.org/learn/python-v9/workshop-bill-splitter/step-4

Your code

running_total += appetizers + main_courses + desserts + drinks
print('Total bill so far: ' + str(running_total))

Expected behavior

The two acceptable solutions are:

print('Total bill so far:', running_total)

and

print(f'Total bill so far: {running_total}')

Both produce identical output to the user's provided code.

Screenshots

No response

System

N/A

Additional context

No response

Guia do colaborador