r/learnprogramming • • 2d ago

Failed 4 programming exams in a row – I don't know what I'm doing wrong anymore

I started out studying electrical engineering and failed the programming exam there 3 times, even though it was just multiple choice. I switched to an easier university program, thinking it would be different, and I just failed again. This time it was a Python exam on the absolute basics: loops, strings, slicing, lists and simple functions. I got 33%.

The frustrating part is that I didn't just ignore it. I did all the weekly exercise sets, and before the exam I studied with practice quizzes and tracing exercises. When I go through it with explanations, I understand it. But on the actual exam it just doesn't come together.

So now I genuinely don't know what the problem is.

Am I studying the wrong way?

Do I just not know how to learn this kind of thing?

Or am I simply not cut out for programming?

If anyone has been in a similar spot and figured it out, I'd really like to hear what changed for you. How did you actually practice? What made it "click"?

Thanks for reading.

30 Upvotes

46 comments sorted by

17

u/SpacewaIker 2d ago

Well if you do exercises on your own, are you able to do them? Is the exam more difficult than the exercises you did?

5

u/gal771 2d ago

It's about the same difficulty. The problem is that it was really time-intensive, and not just for me, others struggled with the time too. I can do most of the exercises on my own, but there's always some small mistake that stops me from fully finishing them. I usually get the main idea and the logic right, but then I get stuck on details like a wrong index or a slightly wrong condition, and the whole thing doesn't work.

2

u/aqua_regis 2d ago edited 9h ago

The problem is that it was really time-intensive, and not just for me, others struggled with the time too.

Well, this is one item you have to tackle. You need to force yourself to work under time constraints when learning preparing for your tests.

there's always some small mistake that stops me from fully finishing them. I usually get the main idea and the logic right, but then I get stuck on details like a wrong index or a slightly wrong condition,

That's the second thing. You need to work on that. "Nearly working" is "not working" in programming.

You need to learn to pay very close attention to details, to minute details.

Overall: you need way more practice. Only that can help you with both your problems. More practice will speed you up, and improve your logic.

Try a site like https://exercism.org

For fundamental exercises, start with https://codingbat.com/python

Late edit: changed the wording on the "time constraints" part to "preparing for your tests" instead of "learning".

1

u/gal771 2d ago

Will check it out! Thank you What do you think about leetcode?

4

u/Jejerm 2d ago

Leetcode is overkill for you and if you're failing basic tests you'll be in way over your head.

Leetcode is for learning optimization and dsa, it assumes you already know the basics of whatever language you're using.

3

u/aqua_regis 2d ago

Leetcode is for interview practice once you are already competent in programming. If you are still struggling with the fundamentals, it is not for you.

Leetcode requires solid foundational skills, experience, and DSA (Data Structures and Algorithms) skills.

1

u/marrsd 19h ago

Well, this is one item you have to tackle. You need to force yourself to work under time constraints when learning.

I'm sure you're right, but it doesn't seem very sensible for a course to force someone to put time constraints on their learning if it means they might bake in mistakes. Getting things right is better than getting things done quickly, especially for programming.

I'm not advising against this: OP has to do what OP has to do. I just wonder if the dept need to re-evaluate their course.

1

u/aqua_regis 9h ago

I agree that it is unfortunate, but since the tests have time constraints, it is necessary that OP applies similar constraints while preparing for tests.

For plain study, these constraints are hindering, not helping. For test prep, they are necessary as OP clearly needs to speed up.

8

u/SpacewaIker 2d ago

Hmmmm, sounds like maybe the exam is just poorly done. When programming for real, small mistakes are fine cause you'll (most of the time) catch them when testing. Not being able to test on a exam is rough, you really have to reread your answers and make sure you don't make mistakes ig

3

u/Lichcrow 2d ago

Start actually coding more. Don't use llm, dont use auto complete. Keep blowing up your program and manually debug.

Do leetcode, it actually helps.

Since we're in the season, you can also do Advent of Code

1

u/gal771 2d ago

Will check it out. Thanks

2

u/Character-Blood3482 2d ago

do you allow to debug on the exam or just one submit only

2

u/gal771 2d ago

One submit only sadly

5

u/Character-Blood3482 2d ago

that is crazy man

2

u/Stopher 2d ago

Are you not finishing the test? If they’re giving partial credit it might be better to get through it all instead of trying to be perfect on every answer.

2

u/lumberjack_dad 2d ago

Not everybody can do every job. I would pivot to something else. You won't regret it especially if you do something else and don't waste your time.

I am all for persevering to achieve something but based on your evidence I don't think it likelyvyou will succeed.

1

u/gal771 1d ago

I agree but this is not something i see myself in the future anyway. I see myselfnin networking

1

u/povlhp 22h ago

Most networking will be handled by AI. Older Networking guys really tries hard to be replaced.

1

u/gal771 9h ago

Other IT jobs will be replaced waaay sooner than networking. People don't even write their own code anymore and there are still jobs.

2

u/Mood-Rising 2d ago

Go try something like Scratch that is visual, and find some beginner programmer tutorials on YouTube that you vibe with. Like watch a dozen videos about how loops work from different people. It sounds like you are not fully internalizing the concepts in a more general way. The best way to tackle it is try to learn and relearn things in multiple ways. Also, if possible do your studying in different locations. Because these are core concepts you want to make as many pathways as possible, and changing the context of where you are learning can help a lot.

3

u/Mood-Rising 2d ago

Another technique I’ve had success with people struggling is on paper write out your day like it’s a program. Don’t get too hung up on if things are “correct”, just try to use functions and loops.

Func WakeUp(time):
If time < 7:
SnoozeAlarm()
else if time > 8:
StartMorningRoutine(urgency = “panicked”)
else:
StartMorningRoutune()

1

u/gal771 2d ago

Thank you! Helps a lot

7

u/Sad_Cauliflower6333 2d ago

The problem is that your asking something that we can’t know unless we see how your work look a like and in that case this post won’t be helpful , no one here will give you an useful answer because we don’t know what your doing, but whatever it is yes you are studying the wrong way.

There’s not such thing has “you don’t know how to learn that kind of thing”

If you say “simple functions” and you are getting 33% then they are not easier for you and you need to put more effort and you need to study more + get a tutor.

I mean good for you that your asking for help but why do You think this is better than ask to your professor why is failing you so you can fix your mistake

2

u/formalcall 2d ago

Yeah, make use of the resources at your university: your professors, your peers, your councillors, tutoring programmes, the CS department, alumni / people that took the class before. They're usually in a better position to help you.

1

u/Inevitable-Corgi-860 2d ago

Were the exams in the other university program also MCQs or were they coding problems?

1

u/gal771 2d ago

50% of points were MCQ and other 50% coding problems. To be exact 12 MCQ and 2 problems

1

u/Gullible_Sweet1302 2d ago

How are you doing in the other subjects?

1

u/gal771 2d ago

Really average

1

u/Gullible_Sweet1302 2d ago

Consider planning for another major. EE courses get harder!

3

u/shrodikan 2d ago

Give an example of a difficult question without knowing the subject matter nor area of study.

2

u/Past92TheTollbooth 2d ago

Keep practicing, it can click.

1

u/Head-Quote8798 2d ago

i failed my first two python exams too, same vibe where i understood the concepts but choked on indentation or colons when the clock was ticking. the anxiety loop was real... i'd stare at the screen, mind go blank, then rush and make silly mistakes. what finally helped was practicing by hand on grid paper. no computer allowed. i had to write full functions out, checking every bracket and colon manually before even thinking about running it. it felt slow and stupid at first, but it forced me to internalize the syntax rules instead of relying on the editor's autocomplete or error highlighting. after doing this for like two weeks, the exam format stopped feeling so alien because i wasn't trying to 'debug' in my head anymore, i was just transcribing what i knew worked.

1

u/MagicalPizza21 2d ago

Just like with any skill, if you are not good at it and you want to be, practice. If you are practicing, practice more. If you can't, then you're probably not cut out for it.

1

u/Garland_Key 2d ago

Testing anxiety maybe? 

1

u/gm310509 2d ago

You didn't mention it, so I do not know one way or the other, but how much did you rely on AI to "help" you?

A common problem is people who describe your situation also seem to have relied on AI quite a bit and as such they weren't actually learning. So, doing the excercises with the help of AI is kind of like asking your friend to do your homework for you. You get the exercises done, but don't really know how to do it yourself.

Again, you didn't mention it, so I don't know one way or the other. But your scenario does seem to have a lot in common with those folks who did rely on AI - so I just thought I'd throw it out there to see what you think.

-1

u/TheStryfe 2d ago

This might not be for you

0

u/gal771 2d ago

Well i agree. I dont want to do this for a living, i just wanna get past this course and move on lol

-1

u/TehN3wbPwnr 2d ago

EE so I'm assuming its questions based around C? or assembly? Are you getting into things like memory management/pointers? or just basics of logic, loops, scope?

2

u/aqua_regis 2d ago

You:

EE so I'm assuming its questions based around C? or assembly? Are you getting into things like memory management/pointers?

OP in the main post:

This time it was a Python exam on the absolute basics: loops, strings, slicing, lists and simple functions.

You didn't even read the post in full.

0

u/Goobly_Goober 2d ago

What are you getting wrong on the exams? Are you just going through the textbooks or are you actually coding and writing programs that fail, and when they fail, do you know how to fix it?