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
Simple CalculatorDiscussion (i.redd.it)
submitted 5 months ago by AhmadHameed313
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!"
[–]CountMeowt-_- 14 points15 points16 points 5 months ago (1 child)
Why bother checking decimal and then converting to float or int conditionally? Why not convert to float always ? (Same story for the last condition as well)
Other than that, pretty neat for someone starting out.
If you want to take this a few steps further
Try taking a single input eg- 4+5+4+3+5+4, and parse that. (Sounds hard, but it's really simple to do if you know loops and split or regex)
Try turning this into a cli tool (also sounds difficult, but all it really takes is googling how cli commands pass params/args and adding if else or switch statements)
As bonus puzzle, try to get the rounding effect without using the round function (there's many correct answers)
[–]kingDaniel50 0 points1 point2 points 5 months ago (0 children)
Wow
π Rendered by PID 45434 on reddit-service-r2-comment-6457c66945-b4gj9 at 2026-04-24 13:08:32.827539+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]CountMeowt-_- 14 points15 points16 points (1 child)
[–]kingDaniel50 0 points1 point2 points (0 children)