...

/

Solution: Automate the Repeated Tasks and Simulate the Data

Solution: Automate the Repeated Tasks and Simulate the Data

Let's look at the solution of the previous exercise.

Solution

The assignment asks us to introduce a new argument that will modify how many prey animals are used in each trial. In the current version, the number of prey is fixed at 10 per trial. But if we replace that number with an argument, let’s call it numPrey, we can adjust the number of prey in different trials. Note that there are three places where we need to ...