August 2019
Beginner
482 pages
12h 56m
English
Next, let's describe the islands our animals will live on. Each island here is an isolated system that tracks all the changes, including the death and birth of all the animals, ever-changing conditions, and so on. For our purposes, these islands will also need to collect stats on the animals.
Let's start small by defining attributes of each island:
The preceding attributes are defined in the following code snippet:
class Island: stats = dict() animals = list() max_pop, year = 0, 0 def __init__(self, initial_pop=10, max_pop=2500): self.year = 0 self.max_pop = max_pop self.stats ...