Financial Ledger Project

Design a ledger that keeps track of credits (money added) and debits (money subtracted) and balance (amount) in an account. Create functions to easily add an entry for credits and debits, as well as a function that will display all of the entries and totals at the end

- Make an Entry class that stores a description, money amount, and whether it is a credit or a debit

- Make a Ledger class that stores the balance amount as well as a list of Entry classes.

- Make a method called add_debit that takes a description and amount as parameters and adds an entry to the ledger

- Make a method called add_credit that acts like add_debit but marks it as a credit

Here is an example of what running the code could look like after you have created a ledger called my_ledger

my_ledger.add_debit("Start balance",1500) my_ledger.add_credit("Bought supplies",100) my_ledger.add_credit("Transportation",40) my_ledger.add_debit("Payment 1",1000) my_ledger.display()
Description Credit Debit Balance ============================================================= Start balance 1500.00 1500.00 Bought Supplies 100.00 1400.00 Transportation 40.00 1360.00 Payment 1 1000.00 2360.00 ============================================================= Total 2500.00 140.00 2360.00
Hint: Code to align columns for each entry
print(f"{description:<30}{credit:<10}{debit:<10}{balance:<10}")
Hint: Code for one way to make the Entry class
class Entry: def __init__ (self, descrip, amount, isDebit): self.description = descrip self.amount = amount self.isDebit = isDebit