The mid-semester test will be held in the lecture in Week 6. The test is worth 15% of the total mark for the unit, and it examines all of the material discussed in the lectures and lab classes up to the week of the test.
Post requests for clarification about any aspect of the test to help4406.
consonants(str)that takes a string and returns the same string with all vowels removed.
>> consonants("Tim A French")
The Lotka-Volterra predator prey equations describe how populations of predators (say foxes) and prey (say rabbits) change over generations. When there are not many prey, and many predators, the prey are more likely to be caught, but the predators are more likely to starve. When there are many prey, and not many predators, the predators are likely to thrive, while the prey are less likely to be caught, but more likely to starve. The prey are constantly breeding (like rabbits).
You are to write a program that predicts the population of rabbits and foxes at each generation.
r_t rabbits at generation
f_t rabbits and generation
t then the populations at generation
t+1 are given by the equations:
r_t+1 = r_t + 0.03 * r_t - 0.001 * f_t * r_t
f_t+1 = f_t - 0.01 * f_t + 0.001 * f_t * r_t
How many rabbits? 30
How many foxes? 10
How many generations 5
No sample given
imperial2metricthat requests an imperial measurement (in feet or ounces) and returns the equivalent metric measurement (in meters or grams, respectively). 1 foot is 0.3048 meters and 1 ounce is 28.3495 grams.
Enter a measurement in feet, or ounces 12 feet
Enter a measurement in feet, or ounces 10 ounces
No earlier papers are available because the unit was new in 2012.