Computer Project Final - pdf2
Computer Project Final - pdf2
CSV_FILE = 'accounts.csv'
def initialize_csv():
try:
file = open(CSV_FILE, 'r')
file.close()
except FileNotFoundError:
file = open(CSV_FILE, 'w+')
writer = csv.writer(file)
writer.writerow(['Account Number', 'Account Holder',
'Balance'])
file.close()
account = get_account(account_number)
new_balance = float(account['Balance']) + amount
update_account_balance(account_number, new_balance)
print(f"Deposit of ${amount} successful! New balance:
${new_balance}.")
account = get_account(account_number)
current_balance = float(account['Balance'])
account = get_account(account_number)
print(f"Account Balance for {account['Account Holder']}:
${account['Balance']}.")
from_balance = float(from_account['Balance'])
to_balance = float(to_account['Balance'])
update_account_balance(from_account_number,
new_from_balance)
update_account_balance(to_account_number,
new_to_balance)
while True:
print_main_menu()
choice = input("Enter your choice: ")
if choice == '1':
account_number = input("Enter account number: ")
account_holder = input("Enter account holder name: ")
create_account(account_number, account_holder)
else:
print("Invalid choice. Please try again.")
# Entry point
if __name__ == "__main__":
mainfn()
OUTPUT
CONCLUSION
The Hustlers Banking System is a robust yet simple
banking solution that provides essential banking
functionalities while relying on the CSV module for
data storage and persistence. The use of CSV files
makes the system easy to maintain, highly
portable, and accessible to non-technical users.
The system can be further extended with
additional features, such as interest calculation,
loan management, or
account history tracking, by leveraging the simplicity
and flexibility of Python’s CSV module.
This program is ideal for small-scale banking
operations or as a learning tool for those looking to
understand how file handling and data persistence
can be implemented in Python.
BIBLIOGRAPHY
NCERT TEXT BOOK FOR COMPUTER
https://www.upgrad.com/blog/python-banking-
project/
https://www.geeksforgeeks.org/working-csv-
files-python/
https://projectworlds.in/tag/bank-management-
system-project-in-python-using-csv/