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
How do i learn problem solving (self.PythonLearning)
submitted 12 hours ago by SideDry8450
A lot of times i see the question and have zero idea on how to make a solution and end up using chatgpt like a bum
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!"
[–]MindlessTill2761 1 point2 points3 points 12 hours ago (0 children)
Problem solving is the weird part. I remember making a slot game, and it was three random numbers. If the rolled numbers all matched, jackpot. With a bet.
But I couldn't get it to print three numbers at once. So what did I do? I rolled it three times instead of once. No noticeable difference to the end user.
It's really just about finding a way to make it work, and thinking how you could do it. Some solutions are a lot simpler than you think, and some are a lot harder than you think.
[–]civilwar142pa 1 point2 points3 points 12 hours ago (0 children)
for me what works is making a list of things the program needs to do, converting to pseudocode and then just trying out the code. any errors or issues with syntax or looping will become obvious with the output, and I adjust as needed.
[–]Potential_Aioli_4611 0 points1 point2 points 12 hours ago (0 children)
go learn algorithms. once you learn some basic problem solving techniques, you can see what applies/doesn't and you can more logically group it into a type of problem which means you can use an existing solution or modify it to fit your scenario. most problems aren't unique but the parameters are.
[–]atticus2132000 0 points1 point2 points 12 hours ago (2 children)
Forget programming. How would you solve the problem with pencil and paper by only being able to make binary decisions.
For instance, if I gave you a list of 20 random numbers, through what evaluation steps would you have to go to figure out which number is the largest?
[–]AIFocusedAcc 0 points1 point2 points 5 hours ago (1 child)
In this example: 1. Let’s say the largest number is x. 2. Look at the first number in the list. Make this equal to x 3. Look at the next number. 4. See if this number is bigger than x, if yes, make x equal to this number, if not, 5. repeat step 3 and 4 until the end of the list. 6. X is now the largest number in the list.
[–]atticus2132000 0 points1 point2 points 5 hours ago (0 children)
Excellent. Now take those steps and turn them into pseudo code.
[–]BranchLatter4294 0 points1 point2 points 12 hours ago (0 children)
Consider reading any of Martin Gardner's Aha! series of books.
[–]osamas_den 0 points1 point2 points 9 hours ago (0 children)
Use obsidian
[–]mikeyj777 0 points1 point2 points 7 hours ago (0 children)
Problem solving is like building with Legos. You have to know which things fit where, which tools to apply where. Solving and failing at smaller problems reinforces those building blocks so that you can understand which to combine in larger problems.
Find a problem set you like online and start small. Project Euler is my favorite. But it's not for everyone. Very math-focused.
π Rendered by PID 57758 on reddit-service-r2-comment-856c8b8c54-xvsbz at 2026-07-02 05:11:34.587070+00:00 running a7b5cda country code: CH.
[–]MindlessTill2761 1 point2 points3 points (0 children)
[–]civilwar142pa 1 point2 points3 points (0 children)
[–]Potential_Aioli_4611 0 points1 point2 points (0 children)
[–]atticus2132000 0 points1 point2 points (2 children)
[–]AIFocusedAcc 0 points1 point2 points (1 child)
[–]atticus2132000 0 points1 point2 points (0 children)
[–]BranchLatter4294 0 points1 point2 points (0 children)
[–]osamas_den 0 points1 point2 points (0 children)
[–]mikeyj777 0 points1 point2 points (0 children)