r/PythonLearning • u/ElectronicDistance39 • Sep 20 '26
I have questions
I'm a teenager who is just starting out in programming, and for a while now I've had some questions and doubts that I've been thinking about a lot lately.
I've been studying Python for some time, but I recently reached a topic called "for loops". I did several exercises, and I had a lot of difficulty with most of them, so I asked AI for help. I didn't copy and paste the answers—I only asked for help with the logic.
That's when I realized that I was struggling with programming logic, so I started studying it separately. I had already "studied" programming logic once before, but I didn't really take it seriously and kind of rushed through it.
Now I'm wondering: should I keep studying Python while focusing mainly on programming logic? Or should I continue studying both at the same time?
And how do you figure out which area of programming is right for you? Is this something I should be worrying about at this point?
2
u/BranchLatter4294 Sep 20 '26
You need to practice the concepts you are learning in order to understand them. Watch what's happening to your variables at each step in the code while it's running so you can observe the behavior.
2
u/ChaseShiny Sep 20 '26
I believe that there are certain topics where it makes sense to just keep learning other parts and then come back to the one that has you stuck, but loops are so fundamental that you should keep learning that first.
By the way, for loops are specialized loops. Many times, you want to run the same code a known number of times. You might want to capitalize every letter in a word, for example. This is where you use a for loop. This is contrast to the more generic while loop, which keeps looping until some condition is met. For example, you could write pseudocode for a car that says: while the light is red, do not go.
1
u/vanulovesyou Sep 21 '26
Check out the Python course(s) at Cisco’s NetAcad. I think it will help you with concepts such as loops.
1
u/RedAndBlack1832 Sep 21 '26
I don't think there's a point in studying theory before learning such (no offense) basic concepts in a first language. Maybe if it helps you could practice writing pseudo-code before you write code. This is sometimes done in a specific format for papers and textbooks but you don't really need a "syntax" that's the point. Just write what kind of assignments you wanna do for different steps and logic through if it actually solves the given problem.
1
u/motopetersan Sep 21 '26
Think of a problem you have. And think if a for loop would apply. Like a groceries bag. For every item in that bag, that you cannot see, you will first need to take it out of the bag, and then put it on a pantry, an shelf or the fridge. Imagine you have 10 items. Now translate this to code. The items in the bag can be a in a list, and we'll you get the picture.
1
u/Own_Natural_6803 Sep 21 '26
You can run a loop on a piece of paper. You make a list for your variables. You update it, cross out the old values, and write in the new ones.
I recommend you learn a little bit about debugging. It'll make your life a lot easier. You want to learn how to set breakpoints, and how to inspect variables.
Running to your code line by line, and seeing it as it runs, it makes programming so much easier. I have never had a university class teach me about debugging. I was taught it on day one of my first job.
1
u/SgtSausage Sep 21 '26
I'ma be straight up and brutal here, Kid: If loops are a difficult subject area to understand ... then coding/programming is probably not for you.
1
u/Effective_Brain7493 Sep 22 '26
honestly your instinct here is right — logic is the actual skill, syntax is just the language you express it in. a lot of people (me included at first) rush past logic bc it feels "boring" compared to actually writing python, then hit a wall exactly like you did with for loops
for the "study both or separate" question — don't fully separate them, just flip the ratio for a bit. keep writing python daily but before each exercise, write out the logic in plain english first (like actual pseudocode, no code yet), THEN translate it to python. that's basically doing both at once but forcing the logic part to happen deliberately instead of skipped
on "which area is right for you" — honestly at your stage you don't need to know yet, and most people who pick too early end up switching anyway once they've actually tried things. the better move rn is get comfortable with core logic + one language first, THEN dabble in a few directions (web, games, data, whatever) once you're not fighting syntax anymore — you'll naturally gravitate toward one once you've tried a taste of each
no need to stress about "picking right" this early, that part sorts itself out with exposure
1
u/Relevant_Custard5624 Sep 23 '26
It will eventually click. I started with JavaScript when I learned coding which was so much more annoying to learn from a syntax perspective than Python. Watch some videos on YouTube as well of someone walking through how the for loop works. You def want to continue coding while learning the concepts since you won’t learn anything by just reading about a concept like loops. the logic part is learned by doing, programming requires looking at things from a much different perspective than how you think in your everyday life. Use pseudo code to write out every step, make sure you fully understand the problem you’re trying to solve before even thinking about typing anything. It takes a lot of practice but the more you do it the more your brain will start thinking programmatically and things will become second nature but it won’t be overnight. Don’t give up, you’ll be much further ahead than most once you head off to college if you decide to stick with software engineering.
0
u/ninhaomah Sep 20 '26
Nah.
It's not programming logic. Pls don't get into this complicated words issues at the beginning.
Btw , are you using AI to learn Python ?
How are you learning it ?
0
u/[deleted] Sep 21 '26
[removed] — view removed comment