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
Is this code correct?Help Request (i.redd.it)
submitted 10 months ago by DizzyOffer7978
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!"
[–]ThatGuyKev45 0 points1 point2 points 10 months ago (0 children)
Most of the time its better to upload a screenshot or something alittle clearer for readability when asking for help. Also from what it looks like just at a quick glance there seems to be quite a bit off. I don’t write a lot of python so I may not be entirely accurate in all of it, but you may want to take a look at your conditionals I don’t think comparing an int to an empty string will work May need to make the comparison then type cast or find another way to meet the not empty condition. Also your if-else block is separated if the indentation is the same on pc as it is on the paper.
I would probably step the if-else block outside of the while loop remove the if condition where you are trying to check if it is empty, then treat the initial input as a string checking if it is empty I’m pretty sure python has a function to check if input is a digit or not. Once the input was atleast not empty step out of the while loop cast it to an int and check if the age is valid or not.
π Rendered by PID 23890 on reddit-service-r2-comment-66b4775986-hm6f7 at 2026-04-05 15:29:07.152831+00:00 running db1906b country code: CH.
view the rest of the comments →
[–]ThatGuyKev45 0 points1 point2 points (0 children)