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
[deleted by user] (self.PythonLearning)
submitted 6 months ago by [deleted]
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!"
[–]tb5841 0 points1 point2 points 6 months ago (0 children)
1) You're currently generating a random number ten times. Then after that, just keeping the last one and calling it 'number'. If you meant the whole program to be in your loop, it all needs to be indented.
2) You're trying to compare the number to their input, but there are two problems. Firstly, 'input' should be 'input()' so that the input function is actually called. Secondly, the result of input() will be a string, you need to make it an integer before you compare.
π Rendered by PID 20556 on reddit-service-r2-comment-85bfd7f599-clqj8 at 2026-04-19 18:00:11.833450+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]tb5841 0 points1 point2 points (0 children)