Budget App - (Help to understand instructions)

Please help me understand why the deposit method should append object to ledger list in the form of {"amount": amount, "description": description}. Why is this particular format suggested instead of just {amount : description} ?

The full readme is here: https://pastebin.com/6b7YX1ZU

I forgot to link the original project. Please find link as follows:

https://www.freecodecamp.org/learn/scientific-computing-with-python/scientific-computing-with-python-projects/budget-app

The second one might look simpler, but compare how data in both these options can be accessed. For example you want to check something in the description, what is needed to get description from both these objects?

1 Like

because you want to have both the amount and the description in the object, not just an onject with a property named amount that contains the description

1 Like