Identifying Attributes in Codes |


I am trying to determine what the following means.

  1. List all of the attributes it uses on itself
  2. For each attribute, give the class this attribute is.

So I searched for examples of code in the internet.

class Circle(Shape):
def init(self, r):
self.r = r

So here is what I came up with:

  1. For the code above, r is an attribute that it uses in itself.
  2. Them, the class that this attribute has is circle.

Is this correct?

Hello @eligan

I cannot answer this in a good way. But I know where to look.
It was a tremendous help for me to watch videos on Youtube along doing this course.
So look up this guy Corey Schafer among other showing things you are doing in Learn the hard way.
Probably some pieces fall into place when you watch other doing the same thing but explain it in another way.
One explanation does not work for everyone. One thing can be explained in many ways.

Thanks, @ulfen69! I will look into it.