Question: I have a good start in creating the class for Pet, but I can't figure out how to ask the user for an entry and

I have a good start in creating the class for Pet, but I can't figure out how to ask the user for an entry and store it as the object. Below is my code so far:

#create pet class class Pet:

#create an object def __init__(self, name,animal_type, age): self.__name = name self.__animal_type = animal_type self.__age = age

def set_name(self): self.__name = name

def set_animal_type(self): self.__animal_type = animal_type

def set_age(self): self.__age = age

def get_name(self): return self.__name

def get_animal_type(self): return self.__animal_type

def get_age(self): return self.__age

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!