![]() With their rapid reproduction rate, and the increasing cultivation of land providing ideal habitat, rabbits soon established large populations in the wild. The spread of the Roman empire, along with increasing trade between countries, helped to introduce the European rabbit into many more parts of Europe and Asia. Inevitably, the rabbits tried to escape and it is perhaps no surprise that the latin name 'Oryctolagus cuniculus' means 'hare-like digger of underground tunnels'. The Romans called this practice 'cuniculture' and kept the rabbits in fenced enclosures. When the Romans arrived in Spain around 200BC, they began to farm the native rabbits for their meat and fur. The European wild rabbit evolved around 4,000 years ago on the Iberian Peninsula, the name 'Hispania' (Spain) is translated from the name given to that area by Phoenician merchants, meaning 'land of the rabbits'. It is a seperate species from other native rabbits such as the North American jackrabbits and cottontail rabbits and all species of hares. There are currently more than 60 recognised breeds of domestic rabbit in Europe and America, all of them descended from the European rabbit (Oryctolagus cuniculus), the only species of rabbit to have been widely domesticated. The break-up of continents during this period may be responsible for the wide distribution of differing species of rabbits and hares around the world, with the exception of Australia. Fossil records suggest that Lagomorpha evolved in Asia at least 40 million years ago, during the Eocene period. Rabbits belong to the order of mammals called Lagomorpha, which includes 40 or so species of rabbits, hares and Pikas. Fossil records suggest that Lagomorpha evolved in Asia. Lastly your if _name_ = '_main_' shouldn't have been inside the function but on the module scope like I have it.Rabbits belong to the order of mammals called Lagomorpha, which includes 40 or so species of rabbits, hares and Pikas. ![]() You also used wrong variable names when calling print(bunnies(rab,fox,yrs)), but I think that was just a copying mistake since you didn't get error messages. ![]() The problem ocurred when you used the already changed value of the rabbit population for the new fox population count. Years = int(input('Enter Number of Years to Simulate: ')) Rabbits = int(input('Enter Initial Rabbit Population: '))įoxes = int(input('Enter Initial Fox Population: ')) Return bunnies(rabbits, foxes, years - 1) Rabbits = rabbits_last math.floor(rabbits_last * (A - B * foxes_last)) Rabbits_last, foxes_last = rabbits, foxesįoxes = foxes_last - math.floor(foxes_last * (G - S * rabbits_last)) FIND THE RABBIT AND FOX POPULATION AS A FUNCTION OF TIME CODEYour code was almost correct, here is a fixed and cleaned up version: import math Years = int(input('Enter Number of Years to Simulate:\n')) Rabbits = int(input('Enter Initial Rabbit Population:\n'))įoxes = int(input('Enter Initial Fox Population:\n')) Rabbits = rabbits math.floor(rabbits * (a-b * foxes))įoxes = foxes - math.floor(foxes * (g-s * rabbits)) This is the code that I have so far, I feel like I am close to the answer, but not fully there: def bunnies(rabbits,foxes,years): Where A = 0.04, B = 0.0005, G = 0.2, and S=0.00005įor a starting input of 5891 rabbits and 16 foxes after 99 years, it should return 6484 rabbits and 144 foxes, but I am getting 4682 rabbits and 189 foxes. R1yr = R0yr Floor( R0yr * (A-B * F0yr)) The algorithm for the foxes and rabbits after one year are: I am able to return an amount of rabbits and foxes, but I am not getting the correct values. ![]() Then output the final number of rabbits and foxes after that amount of years. I am trying to write a predator-prey model where I take the input for the amount of rabbits, foxes, and years. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |