Classwork 11 - Bank System
Classwork 11 - Bank System
Requirements:
1. Create a User Menu: Display a list of options for the user to choose from:
○ Check balance
○ Deposit money
○ Withdraw money
○ Exit
2. Use a While Loop: The program should keep showing the menu after each operation
until the user selects Exit. This is where the while loop is crucial. The loop should
continue running as long as the user does not choose to exit.
3. Bank Account Balance: Initialize the user’s bank account with a balance of 0. The user
can deposit money and withdraw money. The program must check if the balance is
sufficient before allowing a withdrawal.
4. Input Validation: The program should handle invalid inputs gracefully. For example, if
the user enters a non-numeric value when depositing or withdrawing money, the
program should ask the user to try again.
5. Deposit and Withdraw Operations:
○ For depositing money, the program should add the deposited amount to the
balance.
○ For withdrawing money, the program should ensure the user has enough funds
before proceeding. If not, display a warning.
6. Exit Option: When the user chooses to exit, the program should print a farewell
message and stop.