Question: Please write a Python program for a Zoom Management System. The goal of the Zoo Management System is to categorize animals based on their characteristics.

Please write a Python program for a Zoom Management System. The goal of the Zoo
Management System is to categorize animals based on their characteristics. Your program
should do the following:
Create a list of animals with their characteristics. Each animal should have the following
associated information: name, species, legs, habitat. Each element of the list should be a
dictionary with the keys name, species, legs, and habitat.
Example dictionary input: {'name': 'Lion', 'species': 'Mammal', 'legs': 4, 'habitat':
'Grassland'}
Write a function called print_animal_details() that takes a dictionary as an input argument
and prints its details.
Example output: "Name: Lion, Species: Mammal, Legs: 4, Habitat: Grassland"
Use a loop to iterate through the list of animals and call the print_animal_details()
function to print their details.
Write a function to classify animals based on their legs. The function should take the
number of legs as an argument and return a classification.
If the number of legs is 0, return "No legs - Snake or Fish.
If the number of legs is 2, return "Two legs - Bird or Human.
If the number of legs is 4, return "Four legs - Mammal or Reptile.
If the number of legs is more than 4, return "More than four legs - Insect or Spider".
Use a loop to iterate through the list of animals and classify them based on their legs.
Print each classification.
Example output: Lion: Mammal of Reptile

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!