1>>> class Dog:
2... pass
3...
4>>> a = Dog()
5>>> type(a)
6<class '__main__.Dog'>
7
1#Object oriented programming is when you create your own custom class.
2#One reason you should do this is that is saves you time.
3#Another reason is it makes calling certain functions easier with tkinter
4
5class Dog:
6 #init creates certain parameters that allow you to define information quickly.
7 def __init__(self, name):
8 self.name = name
9
10 def get_name(self):
11 return self.name
12
13if __name__ == "__main__":
14 d = Dog(str(input("name your dog: "))
15 print(d.get_name())
16
1class Dog:
2 def __init__(self, name, age):
3 self.name = name
4 self.age = age
5