Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you help fix/finish this code im lost source code a = .1 b = .01 c = .01 d = .00009 default_intial_prey = 1000

Can you help fix/finish this code im lost image text in transcribedimage text in transcribedsource code

a = .1 b = .01 c = .01 d = .00009 default_intial_prey = 1000 default_initial_pred = 20 default_years = 30 print "Simulation end time years >", time = float(raw_input() or default_years) print "Initial Predators >", initialpred = float(raw_input() or default_initial_pred) print "Initial Prey >", initialprey = float(raw_input() or default_intial_prey) for t in range(0,len(time)): 
(10 Points) In a predator-prey simulation, you compute the populations of predators and prey using the following equations: preyt +1 = prey, x (1 + A 3x pred.) predt +1 = pred, x (1-C + D prey.) Here, A is the rate at which prey birth exceeds natural death, B is the rate of predation, C is the rate at which predator deaths exceed births without food, and D represents predator increase in the presence of food. The units of time t are expressed in years Write a program that prompts the user for these rates, the initial population sizes, and the number of years. Then print the populations for the given number of years after your simulation has completed. If the user does not enter a value and just presses the enter key at a prompt, use the following default values: A-0.1, B-0.01, C 0.01, D 0.00009, initial prey-1000, initial predators-20, and years to simulate - 30

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Real Time Database And Information Systems Research Advances

Authors: Azer Bestavros ,Victor Fay-Wolfe

1st Edition

1461377803, 978-1461377801

More Books

Students also viewed these Databases questions

Question

Come up with an EER diagram for the following database:

Answered: 1 week ago