Question: Requirement: - In Python 3.x.x 1) Pet Class (10 points) Write a class named Pet, which has the following data attributes: name(name of pet) animal_type(eg:

Requirement:

- In Python 3.x.x

Requirement: - In Python 3.x.x 1) Pet Class (10 points) Write a

1) Pet Class (10 points) Write a class named Pet, which has the following data attributes: name(name of pet) animal_type(eg: Dog, Cat, Bunny) age The Pet class should have an_init__method that creates these attributes. Also include the following methods set name setanimal type set age - get_name . get animal_type - get age Once you have written the class, write a program that creates an object of the class and prompts the user to enter the name, type and age of the pet. 2) Create a dictionary for the Pet object (10 points) Enter at least 5 Pet objects into a dictionary Make sure they print out the name, animal_type and the age of the pet

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!