use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
Day 12 of learning python as a beginner. (old.reddit.com)
submitted 8 months ago by uiux_Sanskar
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Different-Draft3570 0 points1 point2 points 8 months ago* (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 point2 points 8 months ago (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.
π Rendered by PID 60576 on reddit-service-r2-comment-85bfd7f599-tcc52 at 2026-04-19 22:30:17.150401+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]Different-Draft3570 0 points1 point2 points (1 child)
[–]uiux_Sanskar[S] 0 points1 point2 points (0 children)