So I started learning Python 3 every day and I started officially on June 1st 2020. I’ve been spending a few hours everyday coding on Python 3 from the very start which is the Syntax and have completed every step of the way including projects and quizzes that are in the pro membership, I’ve now reached classes and objects and I’m starting to understand the constructor, self etc which I had been taught in class but always found it hard since I didn’t have the basic fundamentals to start with, but now I do kind of so far. I’ve only done the projects that were in the Python 3 course and not the ones listed.
So for this exercise in Learn Python: Classes, I do have a basic understanding but as we move on to the Learn Python: Inheritance and Polymorphism part, it starts to feel a bit confusing and overwhelming as I’m given all these things to learn. Here you can see what I mean by feeling a bit confused with all of these methods.
By providing the information above, I would like to ask, what is the best way to learn it, I have tried and watched Youtube video’s explaining what it does which I’ve found useful etc.
But for example, this piece of code which is the 7th Dunder Methods exercise, I found confusing for the add method especially the part for the new_red = min(self.red + other.red, 255). I don’t understand what it does or means.
def add(self, other): """ Adds two RGB colors together Maximum value is 255 """ new_red = min(self.red + other.red, 255) new_blue = min(self.blue + other.blue, 255) new_green = min(self.green + other.green, 255) return Color(new_red, new_blue, new_green)
I also have another question regarding Googling everything. Do I only google things I don’t know how to do or google everything even If know how to do it but forget like a for loop, not just the syntax but even the concept? I know the point of coding is to learn how the concept works, but when I learn so much code, I tend to forget how things work, obviously, I know how a for loop works but it’s just an example.