logo codesdope

Class definition

   Sai Anudeep Anapareddy

In the section of “Your class?” and subsection of “Let's get 'self' more clear” while defining class Dog it is written as 

def Dog():

But as it is a class isn’t it written as 

class Dog():

And in the same section while declaring object it is written as

a = Dog()

dog.set_name()

In the above line isn’t it written as 

a.set_name() 


Answers

Write your answer
Close

Welcome.please sign up.

Close

Welcome.please login.