School work bank transaction project

*** Program 1: Bank account transaction program**
A basic bank account program that allows a user to deposit or withdraw money. The program greets the user, shows their current balance, and prompts them to choose between depositing or withdrawing. Users enter the desired amount, and the program updates the balance. If an invalid input is provided, the program resets the transaction process. The program runs continuously, allowing multiple transactions until the user stops it manually.


  • Ask the user if they want to 1 deposit or 2 withdraw (use if statements)
  • If the user inputs something other than 1 or 2, the loop will reset
  • If the user selects deposit, the program will add the value to the bank variable
  • If the user selects withdraw, the program will deduct the value from the bank variable
  • Whenever the user inputs an invalid number (like a negative, or withdrawal is bigger than the bank variable amount, the loop will do nothing and reset)
  • Since it’s an infinite loop, the loop should never stop asking for a deposit or withdrawal

how do i do this?

Welcome to the forums, @Yehia-Gehad-Moh!

You should not be posting your school/uni assignments to this forum. It’s not right to expect others to do the work for you and your tutor will not understand how to help you if you are submitting work from someone else. It is against our policy here.

Please feel free to post questions that will help you understand the building blocks of programs, but don’t post tasks again.


Someone has posted this exact same assignment before…

1 Like

Well, since the TOS let us to give hints and I think they need it, here is some minor

Ask if deposit or withdraw, or ask again if otherwise:

Use input(prompt) to ask, and use while loop to check if the input is acceptable

Select withdraw or deposit does different thing and
Check if input is valid:

Just use if statements, this is easy trust me

This is a forever loop:
Well you said it, use
while True:
while 1:
while “you still trying to do this project and can’t”:
Or any kind of forever loop to do so

(Ok I did a bit of minor roast up there plz don’t mind)

1 Like