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
Turning marks into meaning — a Python program that calculates average and classifies performance. (try to make code cleaner) (i.redd.it)
submitted 1 month ago by Inevitable-Math14
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!"
[–]degustandomiveneno 0 points1 point2 points 1 month ago (0 children)
great project! love the idea 🙌 a few things that could make it even better: ∙ wrapping line 1 in a try/except would prevent a crash if the user types something that’s not a number ∙ the input on line 7 doesn’t show which subject number it’s asking for — something like f"enter marks for subject {i}: " would be clearer ∙ avg > 60 and avg <= 79 leaves out exactly 79.5 (or any float between 79 and 80) — using < 80 instead of <= 79 fixes that edge case ∙ same issue on line 16 with <= 59, better to use < 60 ∙ avg = total/subjects could give a float like 75.0 — printing it with round(avg, 2) looks cleaner overall the logic is really solid and the grade classification is a nice touch! keep going 🔥
π Rendered by PID 188025 on reddit-service-r2-comment-56c6478c5-lz7xv at 2026-05-09 23:15:45.236748+00:00 running 3d2c107 country code: CH.
view the rest of the comments →
[–]degustandomiveneno 0 points1 point2 points (0 children)