0% found this document useful (0 votes)
20 views1 page

Classwork 11 - Bank System

The document outlines the requirements for creating a simple interactive banking system in Python. It includes features such as a user menu for checking balance, depositing, and withdrawing money, along with input validation and a while loop to keep the menu active until the user exits. The system should initialize with a balance of 0 and ensure sufficient funds for withdrawals while providing a farewell message upon exit.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views1 page

Classwork 11 - Bank System

The document outlines the requirements for creating a simple interactive banking system in Python. It includes features such as a user menu for checking balance, depositing, and withdrawing money, along with input validation and a while loop to keep the menu active until the user exits. The system should initialize with a balance of 0 and ensure sufficient funds for withdrawals while providing a farewell message upon exit.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Objective:

Write a simple interactive banking system using Python.

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.

You might also like