r/learnpython • u/Impossible-Budget371 • Jul 18 '25
Help me please I can't code!
Hey fellas ! I started learning coding 2 week back , I'm a non math kid so i tried learning python from scratch and i was learning things like operators data types functions if else elif loops etc .. than i started write codes those task code which my online yt teacher asked us to do but I can't code tht like I can't create logic on my own thn I used to watch the answer thn I think man i could have done tht it's so easy I'm dumb it's like I know what python syntax is everything about it but I can't code on my own other than some simple stuff. Should I drop it? Or carry on ? It's been 2 weeks I have watched around 10hrs of content... please help me.
0
Upvotes
1
u/Affectionate-Pickle0 Jul 19 '25
It sounds like you're trying to solve a problem as one big "thing" and freeze up when you realise how difficult it is to figure out the entire logic chain.
You gotta split the problem into multiple tiny tiny steps and then iterate and refine. Point being that it is difficult to figure out how to make a program that asks the user some of their favourite foods and flavors and cooking skills, and then it spits out a web page that is a recipe book of foods that they might like sorted by difficulty or something.
But it is waaaay easier to split the issue into small parts and so each part separately. You just ask yourself that if you'd have that kind of a program in front of you and you'd be typing those foods etc, how would it go? Where do you type it? What do you need to do in order to get that recipe book?
Probably the very first thing is that there has to be something for the user to write on. Maybe just in command line, or maybe a gui. It probably also has to ask some questions from the user.
You start there. Ask user input. How to ask that? How to write a question on the command line? Then do just that. Next the user also has to answer to that. How do I take user input? You answer that question for yourself and implement it.
Then you probably need to find some recipes. Maybe you know a webpage that has a bunch and they have an api. How to use an api? Just make one api call to figure out how to do it. Maybe a single recipe.
Next up you need to get recipes regarding the user's taste. Maybe there are tags in the api that you could use? Maybe you now need to think how to ask for that input from the user. Dissecting one sentence about their favourite foods is difficult but comma separated list is much easier. This is refining a previous step before you carry on.
And on and on and on.
The trick is to literally split the issue into as small pieces as necessary for you to go "yeah okay i can do that one small thing". And then doing one step. When you get more experience then you immediately start to figure out "good" steps so there is less backtracking and you immediately know how to do something and you no longer have to split everything into quite small bites.
And don't expected not to have to google dumb simple stuff like all the time. You're gonna do it a lot, and yeah, it'll make you feel dumb.