A dictionary gives the antigens on the red cells of each ABO group. You will work out the antibodies, decide whether a transfusion is safe, and list the donors for a patient.
The idea. A person has the antibody against every antigen that his own cells lack. A transfusion is safe when no antigen of the donor meets an antibody of the recipient.
Your tasks.
antibodies. It gives the set of antibodies of a group.safe. It gives True if the donor can give to the recipient.donors_for. It gives the list of safe donor groups for a recipient, in the order A, B, AB, O.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…