Back to Freecodecamp

Step 9

curriculum/challenges/english/blocks/learn-lambda-functions-by-building-an-expense-tracker/658212ba98182f3e855e85f9.md

latest833 B
Original Source

--description--

In this project, you're going to build a simple, yet functional expense tracker in Python.

Start by defining a function named add_expense that takes three parameters: expenses, amount and category. Use the pass keyword to fill the function body.

--hints--

You should use the def keyword to declare a function named add_expense.

js
({ test: () => assert(runPython(`
    import inspect    
    inspect.isfunction(add_expense)
  `))
})

Your add_expense function should take three parameters: expenses, amount and category.

js
({ test: () => assert(runPython(`
    import inspect    
    sig = str(inspect.signature(add_expense))
    sig == '(expenses, amount, category)'
  `))
})

--seed--

--seed-contents--

py
--fcc-editable-region--

--fcc-editable-region--