built a bank program using python

[removed]

76 comments · 99% upvoted · source · other discussions

comments

Due_Faithlessness458

Try a switch for input management, you could also use a single function for managing the amount, make a func that receives a string with the operation and returns the value, so you could make something like this: switch choice: case “1”: balance+=requestAmount(“deposited”) … case “3”: request the amount check for valid transaction …

and define requestAmount(str op) return the same but introduce a variable to the string of the message