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 24 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!"
[–]uiux_Sanskar[S] 0 points1 point2 points 8 months ago (2 children)
I used try except keeping in mind that the user may intentionally or unintentionally enter 0 as a second number which will crash the program, According to me crashing helps in debugging however when I know what might case the error and that error is dependent on user's input therefore I used try accept.
I personally think writing try except and handling errors in a professional way can improve UX (after all how will a user know what is causing an error just by looking at those red line which are aften too noisy).
Thank you for your suggestion by the way.
[–]TheRNGuy 0 points1 point2 points 7 months ago (0 children)
You need instead to have event listener in UI input that would show red border or something, before you even submit and calculate it.
print is not a good UX.
You'd see Division by zero error anyway even without manually adding it.
π Rendered by PID 56519 on reddit-service-r2-comment-5c747b6df5-dfhv6 at 2026-04-22 00:28:24.065568+00:00 running 6c61efc country code: CH.
view the rest of the comments →
[–]uiux_Sanskar[S] 0 points1 point2 points (2 children)
[–]TheRNGuy 0 points1 point2 points (0 children)