A DNA fingerprint is a set of band sizes in kilobases (kb). You will write three functions that decide which man can be the father of a child.
The idea. Half of the bands of a child come from its mother. The other bands must come from its father. A man can be the father only if he has all of them.
Your tasks.
from_father. It gives the set of bands of the child that the mother does not have.can_be_father. It gives True if a man has every band in that set.fathers. It takes a dictionary of names and band sets, and gives the list of names of the men who can be the father.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…