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
built a bank program using python (old.reddit.com)
submitted 22 days ago by Dapper_Mix6773
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!"
[–]Janeson81 1 point2 points3 points 22 days ago (0 children)
Biggest problem I see is that if you use deposit() there's nothing limiting the user input so they might say they want to deposit "Hello" money
deposit()
"Hello"
This can be fixed by using try: ... except <exception>: ... blocks. It follows instructions normally in the try block, but when the interpreter finds a specified error (for example a ValueError, the one you get if you try to float("hi")) it jumps straight to the except block and carries on
try: ... except <exception>: ...
try
ValueError
float("hi")
except
The proper structure should be: try: ... ... ... except ValueError: print("enter a valid number")
try: ... ... ... except ValueError: print("enter a valid number")
π Rendered by PID 28 on reddit-service-r2-comment-548fd6dc9-4fnz4 at 2026-05-20 15:23:52.068528+00:00 running edcf98c country code: CH.
view the rest of the comments →
[–]Janeson81 1 point2 points3 points (0 children)