mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
934 B
934 B
id, title, challengeType, dashedName
| id | title | challengeType | dashedName |
|---|---|---|---|
| 69757cc0faae0152c1418aad | Step 1 | 20 | step-1 |
--description--
In this workshop, you will practice working with numbers and mathematical operations to build a bill splitter. This tool will calculate how much each person owes after adding meal costs and a tip.
To start, you need a way to keep track of the total amount as costs are added.
Create a variable named running_total and assign it the value 0.
--hints--
You should have a variable named running_total.
({
test: () => assert(runPython(`
_Node(_code).has_variable('running_total')
`))
})
You should assign the integer 0 to your running_total variable.
({
test: () => assert(runPython(`
_Node(_code).find_variable('running_total').is_equivalent('running_total = 0')
`))
})
--seed--
--seed-contents--
--fcc-editable-region--
--fcc-editable-region--