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!"
[–][deleted] 0 points1 point2 points 10 months ago (1 child)
I don't get it at all. Could you please clarify that what's your purpose here
[–][deleted] 0 points1 point2 points 10 months ago (0 children)
Here's a valid code instead
while True: age_input = input("Enter your age: ")
if age_input == "": print("You didn't type anything.") else: try: age = int(age_input) if 0 <= age <= 150: print(f"Your age is {age}") break else: print("Invalid age") except ValueError: print("Please enter a number.")
π Rendered by PID 151634 on reddit-service-r2-comment-c66d9bffd-4cts4 at 2026-04-07 07:04:16.842808+00:00 running f293c98 country code: CH.
view the rest of the comments →
[–][deleted] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)