A model says that ovulation comes days before the next period, and that the fertile days run from days before ovulation to days after it. You will write the model and count the fertile days that the days to leave out.
The idea. For a cycle of days the model gives days to . For other cycles the window moves.
Your tasks.
ovulation_day. It gives the day of ovulation for a cycle of cycle days.fertile_days. It gives the list of the fertile days.left_out. It gives how many fertile days are outside days to .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…