It returns a 1. According to the math-like definition, this is not correct. Again, it should be up to the caller to ensure that arguments are correct and to write error messages if they are not.
Month | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | |
Female Rabbits | 1 |
Say that you have one new-born female rabbit. The rabbit is labeled with the month of her birth.
If you start out with one baby female rabbit, how many female rabbits will you have in 10 months? Assume that no rabbits die.
Rule: A female rabbit becomes mature at age two months, and produces 1 baby female rabbit every month from then on. (Assume that there are enough male rabbits to ensure this.)
The chart shows the number of rabbits during month one. We need to fill in the rest of the chart.
How many female rabbits are born during month two?