You will write a model of the positive feedback of birth. Each round of contractions multiplies the strength by a gain, until the strength is enough to push the baby out.
The idea. After rounds, the strength is the first strength times the gain, times over. Birth needs units.
Your tasks.
strength_after. It gives the strength after n rounds.rounds_needed. It counts the rounds until the strength reaches needed.rounds_for_each. It gives a list with the rounds needed for each gain in a list, starting from the same strength.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…