Define pet type , Create multiple pets , Like dogs , The rabbit , cat , Parrot , Hamster , Tortoise, etc , Show each pet information , Such as color , Weight etc. .
class PetClass: def __init__(self, pet_name, pet_color,pet_weight): self.name = pet_name self.color = pet_color self.weight = pet_weight def info(self): return "{}, Color :{}, weight :{}".format(self.name,self.color,self.weight)p_cat = PetClass(" cat "," black ","5KG")print(p_cat.info())# Other pets can define themselves