Question: 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 Can you help fix/finish this code im lost source code a =.1 b = .01 c = .01 d = .00009 default_intial_prey =source 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!