r/learnpython • • Dec 09 '24

Why tf is python so damn difficult for me

So I'm currently taking a class in high school and we're learning to code in python and I'm so damn behind. Everyone else is like coding pygame and I'm just the only one trying to figure out one of the fundamentals. I feel so damn hopeless the thing is I could barely remember how to write the code every time I read the material... I worry a lot that I have low IQ because of that...

0 Upvotes

46 comments sorted by

9

u/[deleted] Dec 09 '24

I'm not from the area, but I've been learning Python on my own. The only language I was taught in uni is R. That said, I can think of some reasons like:

- Relying too much on GPT. Really, the amount of things you can just ask it to do, and then go debugging, is insane. I have a classmate that people think he's a genius, when, in reality, he just uses GPT for everything and makes a whole marketing of how he knows technology.

- Prior experience with python or other languages. You're in high school. Maybe there are some classmates interested in making games that have tried other languages or even python. When you learn one language, it's way easier to learn another one.

- Focusing on that subject more than others. Maybe some just loved learning python and have made it their new hobby, spending much more time than the ones who see it as just one subject among other ones.

- Too lazy to learn the fundamentals. That was me with R. I can do nice graphs and, with GPT, solve many problems. But have skipped many of the fundamentals. I'm taking this time the longer road with python and making a solid fundamental. When you skip it, you get to do big things with just some tools you grew more used to, instead of having the big view of all the process.

In any case, just follow your own time, and try to do small projects about things you're enthusiastic about. For me, that was silly rpg text games to learn the fundamentals. The evolution will come with time ;)

1

u/[deleted] Dec 09 '24

The problem is that those python tests I got are part of my marks, and also I never really coded before I only just started in high school

1

u/[deleted] Dec 09 '24

But yeah.. gotta confess I sort of did skip some fundamentals I'm fucking stupid

2

u/[deleted] Dec 09 '24

Pick up a book like "automatize the boring stuff with python". It covers all the fundamentals from the scratch. Maybe, people are learning outside class, while the teacher may not be that good to explain (mine in uni was horrible, for example).

1

u/[deleted] Dec 09 '24

Yeah usually I barely practice it at home cuz I'm a lazy piece of shit (ADHD I guess)

3

u/pickadamnnameffs Dec 10 '24

I've noticed that throughout this thread,dude been helping you with long ass comments and helpful tips,you haven't thanked them once,not nice

1

u/Analysis-Previous Dec 15 '24

If your going to try to learn stuff leave your phone in another room.

1

u/ShadowRL7666 Dec 09 '24

Take drugs they solve all your problems went from brain rotting 24/7 on TikTok to actually building stuff again.

1

u/Analysis-Previous Dec 15 '24

You have to go back and learn them. You may try learning certain things from youtube videos if reading it out of a text book sounds like gibberish in your head.

6

u/Warmspirit Dec 09 '24

From your post, I feel that you are mostly just venting. If you are just wanting to be heard, then you have been! Coding can be tough and concepts are hard to get around especially in HS I’d imagine.

If you are looking for advice however, I’d recommend reflecting on your progress. Firstly, take an hour - maybe 2 if you are very stressed - to write down how you feel about your progress (this includes failures AND accomplishments) and look at what you do and don’t get. Also think about how you are studying, are you giving yourself enough time? The right location (distraction free)?

Now that you’ve analysed your current progress, try and find what to do next. If you struggle with syntax, read the docs and google everything you don’t understand, if you struggle with CS concepts… Google! Try stuff out! Python is a very good tool to learn with, see what works and what doesn’t for your particular task. Every so often, assess your progress and do the same process of asking what is going well and what isn’t.

It’s also worth noting that if you are not retaining information then you could experiment with different methods of note-taking (I use markdown lists and mindmaps, some people like flash cards etc).

You likely don’t have low IQ, other people have probably just spent more time within CS. Imposter syndrome will always be an issue, even your peers will feel this.

Wish you the best of luck 👍

1

u/[deleted] Dec 11 '24

this is such a helpful comment 10/10

-1

u/[deleted] Dec 09 '24

The problem is that I grasp concepts pretty slowly, and anything that requires some deep abstract thinking I have a hard time with that...

I'm jealous of people who can grasp concepts quickly without even trying

1

u/AminoZBoi Dec 09 '24

Have you tried grasping with different methods?

Like visualisation, analogies, etc.

Often, I find the issue is how you learn, not what you learn.

2

u/FerricDonkey Dec 09 '24

First, don't compare yourself to others. Different people learn different things at different speeds in different ways. There is always someone smarter or faster - good for them, but do you want to master this skill? If so, then do it. What other people are doing is irrelevant.

Second, programming is not easy. Lots of people struggle with it, for a long time. 

You've got to do what your school requires, of course, but beyond that: is hard for you because it's hard, it may or may not be easier for anyone else, and if you want to learn it then learn it for you own sake, in whatever amount of time you're willing to spend. 

1

u/[deleted] Dec 10 '24

Yeah thank you. Tbh I think I've been relying too much on the school to learn it

3

u/[deleted] Dec 09 '24

IQ ≠ memorization

0

u/[deleted] Dec 09 '24

It's not just memorization it's just I can't fucking understand and comprehend it cuz I'm too fucking dumb

6

u/[deleted] Dec 09 '24 edited Dec 09 '24

You’re not dumb. It just hasn’t clicked yet. One of the greatest skills in coding (or anything) is perseverance. You may have to study more than others, but you’ll get it eventually. If I were you, I’d watch some of the Harvardx CS50p videos for Python. They did a good job at explaining Python and how computer science works.

Also, you’re in high school. It’s a new concept. It takes time. Be kind to yourself. We learn differently and at different paces.

I teach high school, and sometimes the kids who “get it” quickly might be dumb as shit holistically. If you’re smart, and you’re struggling with Python, just take the win. You’re smart.

1

u/[deleted] Dec 11 '24

i am also learning python and my best friend atm is chat GPT. When i don’t understand something i ask it to explain like i am a little child, it works all the time. Try it!

1

u/AminoZBoi Dec 09 '24

Have you tried grasping with different methods?

Like visualisation, analogies, etc.

Often, I find the issue is how you learn, not what you learn.

1

u/[deleted] Dec 09 '24

Doesn't work.. I feel like it's my IQ that's low like below 80 probably

1

u/AminoZBoi Dec 09 '24

Have you tested your IQ? Do you have a hard time with other abstract subjects? Otherwise, how can you be sure?

1

u/[deleted] Dec 09 '24 edited Dec 10 '24

Yes. I did WISC IV test when i was 7- 9 years old, and sadly it actually stated I have significant cognitive impairments . I have autism which came with this disability.... I feel very hopeless because of it

1

u/copperfoxtech Dec 10 '24

TL;DR - You can do it!

First off stop comparing yourself to others. It doesn't matter what they can do. ONLY compare yourself to yourself. Make reasonable goals for yourself so you can look back at the end of the day / week / month and say, I did learn something and that means I am progressing. This is very important OP.

I really struggled learning for many reasons in elementry, middle and high school. To the point I would call myself stupid and worthless all the time. Because of that I started to become those things but, it's is not who I am. It turned out that I did not know how to learn the way I needed to learn.

Fast forward to after high school I got a job and started to excel in it. Hands on learning and seeing direct results from my actions. Then by 20 I became a manager of a restaurant, more years passed I kept progressing and progressing until I was being called to open restaurants from people in my network.

About 1.5 years ago I thought I would switch careers and persue programming. I joined 42 School in Bangkok where they start you off with the C language. I let all my trauma come back and I felt stupid and worthless again. I could not truly grasp concepts of for loops, while loops, recursion, pointers, and manipulating files from the terminal. I 'passed' the beginning and was invited back for the next stage. When I returned the people that oversee 42 School said, "Wow you came back?!?" on the first day back. I was crushed and never went back after that. I thought I was too stupid and that confirmed if for me.

I then started to tackly Python and had a mentor, codecademy, BroCode on YouTube, along with my own determination, drive and curiosity. I pushed forward. Slowly slowly slowly I started making progress and learned not to compare myself to others again. I was proud that I figured out a for loop and truly understood. Step by step I learned new things making sure to look back at the end of each week and take note of what I did.

I still struggle everyday to be honest. Some days I feel amazing and accomplished and the next I feel like I am wasting my time changing careers. Its a process OP.

Go back to the very beginning of Python and start again with the basic concepts. repeat them again and again until they are stuck in your head. Along the way build small projects in the terminal. F*** PyGame and f*** everyone elses progress, you are on your own journey. You just need to work harder and be more tough.

Good luck OP and as many questions here in this community.

1

u/[deleted] Dec 10 '24

Thanks for some motivation. Ngl tho I do really wish I was born with high IQ would be nice having ability grasp concepts quickly and just having a brain able to handle complex math and stuff...

Oh well.

1

u/copperfoxtech Dec 10 '24

Yeah me too my friend. For people that are not blessed with a naturally high intelligence need to work harder and because of that we have other skills that are desired by other people: persistence, drive, determination, and more. If you really do want this, start over and go slow. Repeat the lesson 1,000 times if you have to. The beginning stages of learning python are the hardest but once you get going the momentum will help. I have trouble with this but stay positive, every day is a new day. Trust.

1

u/GnPQGuTFagzncZwB Dec 10 '24

Coding can be very hard to start. I have a heck of a time looking at a blank page. I am not sure how popular this tactic is but the way I get around that is I bring in something I have done before and modify it, so I am not stuck with a blank page. And a lot of the stupid crap I already have. Dumb things like dealing with files, or formatting strings, lots of little things, I will space on between projects. I have stuff over the years in everything form DOS bat files that can be a lot more powerful than most people think, through shell scripts in bash and sh, basic, C, and python. Some perl in there for a bit too, though I was never too enamored with it. My office mate would write things to automate tasks with it and spend a week and I would spend 2 hours plumbing something together in bash. Not pretty but functional.

So you have to write something from scratch or start hacking someone elses code. The issues there are two. One is they may be a crappy coder like I am, and the other is some people either like to show off and make really nutty lines that would make much more sense to the casual observer if broken apart, and on the other end some people get too carried away with breaking every little thing out. Ideal for me is being able to look at it and see what it does.

Once you have one thing written, even just like a simple loop to count to 10, copy that to your next project and you have something to start from. And you do not have to look up how to do that kind of a loop again cause it is in front of you.

Also try when you program and get it going to make it do more things. For example if you had a loop that counted to 10, make it ask for the number to count to instead. Once you have that make it so it defaults to 10 if no input is given. Make it so it spits out only odd or even numbers. Make it so it adds a line feed at 40 chars. Make it so it dumps its's output into a file.

Now that you can make a file. You can also print, so have it make a web page, print the html code and have the numbers in the web page. Open it with your browser and see how it worked.

Just take each thing you do one little step beyond what the last one was, and do not worry to much about being pretty at this point, go for functional.

Also one last thing, a brief word on how to study, if you have an on line class or a CD.. Out old company was big on CD's or dvd's, but you can apply this to books too.

  1. Watch a chapter. Pay attention but do not worry about the fine points. Just see what he is trying to do and the tools (commands and techniques) used to get there. Get and idea of what he is doing.

  2. Watch it again and this time stop and pay attention to the small stuff. What data is he passing to the commands, does he elaborate on the syntax, etc. Get an idea of how he is trying to do it.

  3. Watch it again, and this time follow every exact step until you get the exact same results. Exact is the key word here. If something is not right, go over it and over it until you have it nailed. Learn to do it.

  4. Now the fun part, hack it! Make it do something similar but different. Start easy, get a feel for things and slowly expand. Hint: Look up any commands and see if they have interesting arguments that might be fun to try. Fun my be enthusiastic but once you have hacked a little bit, it should start to be fun!

And next assignment, START with a copy of one of the last things you did that worked and you have a bunch of working examples of things to start with. No need to look up how to make a loop if your last program had one! Same for conditionals etc. Steal form yourself!

0

u/[deleted] Dec 10 '24

Yeah honestly I probably should've tried at least getting some head start before the class began programming.. it's one of the mistakes I've made

1

u/commy2 Dec 09 '24

Programming is not for everyone, just like how playing an instrument, painting, or elite sports is not for everyone.

1

u/ptrdo Dec 09 '24

Seconded.

Software engineers are about 1% of employees, and I'd bet at least half of those software engineers are dumb as rocks when it comes to doing practically anything else, like design, project management, usability, leadership, carrying a conversation, public speaking, cooking, dressing nice, and millions of other things.

Anyway, I was a software engineer for 20 years, and I always felt dumb. Even the smart ones feel dumb (but just don't say). But that's okay because feeling dumb is a good motivator to improve. In the end, that's a pretty good reason why people stick with it. That and the money. But the feeling dumb part never goes away. You just learn to deal.

1

u/[deleted] Dec 09 '24

It's not that i "feel" dumb I am actually dumb...

3

u/ptrdo Dec 09 '24

Okay, maybe you're dumb, but so is code. Most of the time it takes a hundred lines of code to do practically nothing, and then it does that wrong.

1

u/nivaOne Dec 09 '24

When I learn a language I make a brief synthesis of what I have seen so far. I put everything in an order that makes sense. Because you are not learning things in some chronological order, you do not see the wood through the trees. But that is ok. I take my special notes and I read them completely several times a week. The notes are growing but that is fine as the first notes that I have added are so clear by now that it only takes a couple of minutes to read them. I just want to say that you can develop a method that allows you to memorize what you have seen so far in a structured manner. And this is just that particular part. Regarding coding and how to do it next to using the right command, do the same with all the exercises you have seen so far., For me this has always helped me.

1

u/[deleted] Dec 10 '24

Freecodecamp.org could help you.

1

u/[deleted] Dec 10 '24

Success is 90% persistence and perspiration, for everyone. Even the brightest still have to put in the time it takes to work.

Don't challenge yourself about what you don't yet know. Focus on what you do know and expand on that, in your own time.

It's never good to try to tackle the whole of anything, all at once.

Talk to your instructor/teacher about how you feel the course is going for you. Let them know that you're eager to learn but not feeling confident that you're keeping up at your own standard of expectation, but that there's no way you want to quit and just want some advice.

There's an element of suspension of disbelief involved in dealing with math and programming, just the same as the process that occurs when you're reading a book, where you just have to accept that the author of the knowledge is not going to lead you astray, no matter how weird and/or unbelievable the story seems.

Forget, for a while, about how you think that you know about anything, and let what's in front of you just sink in, and accept that it's a new way of thinking, and don't fight against yourself. Everything worth knowing is always new, at first.

The clarity of your post is evidence that there's no reason to worry about your IQ.

Check out freeCodeCamp.org, so that you can do your own private study without the stress of the classroom.

1

u/[deleted] Dec 10 '24

At the end of the day a lot comes down to repetetition and actually doing things.
When I took a break from coding because none of my university lectures required any (loads of theoretical stuff) or whan I went back to doing basic coding exercises after mostly doing deep learning, it always took me 2-3 weeks to actually get into the rhythm again.
This sounds like the typical problem you have when you watch a lot of videos and read stuff, but dont actually program yourself often enough.

1

u/CompetitiveTart505S Dec 10 '24

If you haven’t already I highly suggest you go make something. Go make a calculator or a weather app or something.

It’s a pretty active skill set to code

1

u/maw501 Dec 10 '24

It’s not about being smart or not. The issue is almost certainly some missing prerequisite knowledge, which is completely fixable.

You can think of learning Python (or any other technical subject) like playing a video game: if you’re trying to smash the boss on level 10 but haven’t mastered level 1, you’re going to get beaten. Badly.

Your brain can only handle so much at once (this is Cognitive Load Theory). If your foundations aren’t solid, your brain gets easily overwhelmed, making it hard to retain anything. And you get very frustrated.

I’m not sure how or why you are in this position but there’s a few key things you can do:

  1. Master the foundations: If you are truly still trying to figure these then out don’t move on until you’ve got them fluent. By fluent I mean you should be to solve exercises / write code using the knowledge from these areas without breaking a sweat. Nodding along and thinking you’ve mastered them doesn’t count. They have to be within your (mental) muscle memory.

  2. Deliberate practice / active engagement: Don’t just read code, even if there are no exercises. Type it out, play with it, make mistakes, and then debug. Use AI to create (simple) exercises for you based on the content.

  3. Use beginner resources: If you need something structured and supplementary start with free and simple online tutorials or courses.

This definitely isn’t about IQ - it’s about building a strong foundation. Which anyone can do. Good luck!

1

u/LemonDaFourth Sep 06 '25

yeah Python is annoying and hard, it's harder when you get one "," wrong and the program just refuses to exist, and it doesn't even tell you or give you a clue as to where it breaks

1

u/imreloadin Dec 10 '24

Maybe you're just dumb?

2

u/theirStillHope Dec 10 '24

I wouldn't cry if they find you hanging

0

u/[deleted] Dec 10 '24

Try Rust - it’s easier.

0

u/jam-and-Tea Dec 10 '24

You mention maybe having ADHD. Me too. I don't think I could have learned python unless I had practiced before I took classes. Do what you need to do to get through the class. It sucks not to be good at things, but just make it through. Then, when you are free from the class do it on your own and focus on things that interest you.