A Python-based command-line application that simulates a basic bank account management system with user creation, account management, and transaction features.
- User Management: Create new users with CPF, name, birth date, and address
- Account Management: Create and list bank accounts associated with users
- Transactions:
- Deposits: Add funds to your account
- Withdrawals: Withdraw funds with configurable limits
- Statements: View transaction history and current balance
- Security Features:
- Daily withdrawal limit (3 withdrawals maximum)
- General withdrawal limit (R$ 500)
- Balance verification
- Input validation with error handling
simple-bank-account/
├── challenge.py # Main application file
└── README.md # This file
No external dependencies required. This project uses only Python's standard library.
Requirements:
- Python 3.6 or higher
To run the application:
python challenge.pyOnce the application starts, you'll see the following menu:
================ MENU ================
[d] Deposit
[w] Withdraw
[s] Statement
[nc] New Account
[la] List Accounts
[nu] New User
[q] Exit
=>
-
Create a User (Option:
nu)- Enter CPF (digits only)
- Enter full name
- Enter birth date (dd-mm-yyyy)
- Enter address
-
Create an Account (Option:
nc)- Enter the CPF of an existing user
- Account will be created automatically
-
Make a Deposit (Option:
d)- Enter the deposit amount
- Funds are added to your balance
-
Make a Withdrawal (Option:
w)- Enter the withdrawal amount
- System checks:
- Sufficient balance
- Daily limit (R$ 500)
- Maximum withdrawals (3 per session)
-
View Statement (Option:
s)- See all transactions
- View current balance
-
List Accounts (Option:
la)- View all created accounts with details
-
Exit (Option:
q)- End the application
- Withdrawal Limit: Maximum of 3 withdrawals per session
- Daily Limit: R$ 500 per withdrawal
- Minimum Amount: Only positive amounts are accepted
- CPF Validation: System prevents duplicate CPF registration
- Account Creation: User must exist before creating an account
- Data Persistence: Data is stored in memory only (lost when exiting)
Enter CPF (digits only): 12345678901
Enter full name: João Silva
Enter birth date (dd-mm-yyyy): 15-03-1990
Enter address (street, number - neighborhood - city/state abbreviation): Rua A, 100 - Centro - São Paulo/SP
=== User created successfully! ===
Enter user CPF: 12345678901
=== Account created successfully! ===
Enter deposit amount: 1000.00
=== Deposit completed successfully! ===
Enter withdrawal amount: 200.00
=== Withdrawal completed successfully! ===
No transactions were made.
Balance: R$ 800.00
The application includes error handling for:
- Invalid numeric input (non-numeric values)
- Insufficient balance
- Exceeded withdrawal limits
- Exceeded daily withdrawal count
- Invalid operations (unknown menu options)
- User not found errors
- Persistent data storage (database or file-based)
- Transaction history with dates/times
- Interest calculation
- Bank transfer functionality
- Account types (checking, savings)
- Multi-language support
This project is provided as-is for educational purposes.
Elton Lazzarin
For questions or suggestions, please reach out via GitHub or email.