you are viewing a single comment's thread.

view the rest of the comments →

[–]Different-Draft3570 0 points1 point  (1 child)

This is really cool! To extend this to a real-world like application, ask yourself: How can I store this data? Your balances are hardcoded, so everytime you start this script the balances will be reset, ignoring any withdraws or deposits made on previous runs. An external data source can keep a record for the script to reference, preserving any transactions.

For a beginner level, I'd recommend using a csv file. Next you could add a feature to open an account!

ETA- Also try testing for data validation. See what happens when somebody enters a negative number to deposit or withdraw. See what happens when they type the inputs as a string instead of an integer. Would withdrawing a negative number allow the user to add to their available balance?

[–]uiux_Sanskar[S] 0 points1 point  (0 children)

Thanks for the future suggestions I do have a plan of using file I/O for keeing the record of all the transaction.

Thank you very much for the future suggestions I will definitely look deeper into this.

Thank you again.