
- #Animal age calculator full
- #Animal age calculator code
gestation period (# of months a female is pregnant before giving birth).HOWEVER, even when there is not enough food, allow breeding to occur at a 0.5% rate.there should be more food/water currently available in habitat than is required to support the current population.available females (not pregnant and within the breeding age range).When a female gives birth, the sex of the offspring should be chosen 50:50.When a species starts in a new habitat it should begin with exactly 1 male and 1 female.
#Animal age calculator full
Extreme Temperature: 1 full month above or below threshold for species. Starvation: 3 consecutive full months without food. There is no need to keep track of parent/child relationships. You only need to run one species at a time inside of a habitat (no need to run species side-by-side). Each month individual animals should consume food & water, age, and survive temperature conditions. When running multiple iterations, final stats should represent stats from all iterations combined. The Iterations value in the config should control how many times you run the full simulation from beginning to end. The Years value in the config should control how many years the simulation should run. Animals only eat/drink/mate/die at 1 month intervals & habitats only refresh their food/water/temperature at 1 month intervals. The passage of time should be in months. Mortality Rate: x% #overall death percentage Result: At the end of each run, provide the following data- 1. Task: create an application that imports the provided YAML config file (which contains Control, Species and Habitat parameters) and then simulates the passage of time for each species in each habitat. The given parameters made it somewhat impossible for kangaroos to survive, but no one really likes kangaroos anyway. This was a coding challenge I was given which I had some fun with and learned a bit on. Monthly_water_consumption: 4 #arbitrary unit Monthly_food_consumption: 3 #arbitrary unit I was given a YAML file of a variety of animals and habitats-here is one of each: species: #Animal age calculator code
I am submitting this as a code sample for a possible job, so I'm just looking for any major red flags or simple ways to fancify it a bit. (This is all available in a github repo if that's easier: )