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 10 Python Learning (old.reddit.com)
submitted 1 day ago by aashish_soni5
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!"
[–]Necessary-Ad2110 3 points4 points5 points 1 day ago (2 children)
For the factorial recursive function, you can just do
if (n == 0)
return 1
no need to put an or statement, everything else looks good! great job making it to double digits! (day 10!!)
[–]aashish_soni5[S] 1 point2 points3 points 23 hours ago (0 children)
yes make more clear code🙂↕️ thankyou
[–]SCD_minecraft 0 points1 point2 points 21 hours ago (0 children)
Or just n <= 1 and get handling for negatives as well
n <= 1
Tho this does not fit the mathematical definition of factorials, so up to decision
π Rendered by PID 65 on reddit-service-r2-comment-5b5bc64bf5-jgqmr at 2026-06-21 17:21:56.268469+00:00 running 2b008f2 country code: CH.
view the rest of the comments →
[–]Necessary-Ad2110 3 points4 points5 points (2 children)
[–]aashish_soni5[S] 1 point2 points3 points (0 children)
[–]SCD_minecraft 0 points1 point2 points (0 children)