The following code transforms the struggle for survival into a mathematical equation. A user is asked to enter a number of carnivores to create between 1 – 100. Once the number has been decided, the plants, herbivores and carnivores reproduce contingent on a specific ratio between plants:herbivores:carnivores or 16:6:2.
The program takes 3 separate life forms plants, herbivores and carnivores and increases or decreases their reproduction rate depedent on their ratio in comparison to the other life forms. A ratio of ...Read more →