This is a simple bank account management system implemented in Python. The program allows users to make deposits and withdrawals, view their account balance, and view a transaction log.
- Run the program by executing
python main.py
in the command line. - Choose an action from the menu by entering a number between 1 and 5.
- Follow the prompts to complete the chosen action.
This class represents a bank account and has the following methods:
__init__(self, name, balance)
: Initializes theBankAccount
object with a name and balance.deposit(self, amount)
: Deposits the specified amount into the account.withdraw(self, amount)
: Withdraws the specified amount from the account, if possible.__str__(self)
: Returns a string representation of the account name and balance.
This class represents a transaction log and has the following methods:
__init__(self, name)
: Initializes theTransactionLog
object with a name.add_transaction(self, date, amount)
: Adds a transaction to the log with the specified date and amount.write_to_file(self)
: Writes the transaction log to a text file.__str__(self)
: Returns a string representation of the transaction log.
Feel free to submit pull requests or open issues for any bugs or feature requests.
This project is licensed under the MIT License. See the LICENSE
file for details.