I'm going through the exercises but I don't know what I'm doing, and worse, I don't know why I'm doing it

I feel like there a lot of assumed prior knowledge in the way that this topic is presented. As if it’s for people that already have an understanding of general programming concepts from another language and just want a crash course in the specific manner that Python deals with those concepts. Given that Python is the go-to recommended starter language for those with absolutely no previous programming experience, I feel there’s a foundation step missing for users like me.

I don’t know why we’re making classes. I don’t know what they’re for. It’s just not clicking with me because I’ve yet to see one solve a problem that couldn’t have been solved much more simply without classes. All the explanations on the cheatsheet are littered with terminology I’m not familiar with and aren’t explained well in the course.

I suppose the question is: under what circumstance would you be faced with a problem and think to yourself “Yeah… I’m gonna need classes here…”?

1 Like

Hello. I was in the same boat. Classes are actually if you want to make a new object. For example, a string is an object. If I want to make an object that behaves in a certain way, that is not already pre-defined, then I would make a class. Say I needed to make a data base for a school. I could, in theory have a dictionary with each student, but it would be hard. With classes, I can make an object (like a data type) about students. I can then build in functionality that I would need, like a function to change their GPA, or a function to change their attendance record. I could then easily log multiple students, and easily check their status, GPA, and other information.
I hope this helps!

1 Like