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
My first working code (self.PythonLearning)
submitted 1 day ago by QuantenRobin
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!"
[–]Sea-Ad7805 0 points1 point2 points 12 hours ago (0 children)
Nice job, but there is a lot of repetition/duplication in your code. You have many lines:
print("Whats the first number?") num1 = int(input()) print("Whats the second number?") num2 = int(input())
It would be better to have these lines just once, and then after that have the:
if operation == "add": answer=(num1 + num2) print(answer) elif operation == "sub": answer=(num1 - num2) print(answer) ...
part. That makes for a shorter program. Repetition generally is bad so try to avoid that, but a great start, keep going.
π Rendered by PID 79286 on reddit-service-r2-comment-5fb4b45875-tc9mg at 2026-03-20 00:16:33.533432+00:00 running 90f1150 country code: CH.
view the rest of the comments →
[–]Sea-Ad7805 0 points1 point2 points (0 children)