Open
Description
My initially incorrect code passed check50 with this:
// TODO: Randomly assign current person's alleles based on the alleles of their parents
aperson->alleles[0] = parent0->alleles[rand() % 2];
aperson->alleles[1] = parent0->alleles[rand() % 2];
inheriting both alleles from parent0
.
The second line should have been aperson->alleles[1] = parent1->alleles[rand() % 2];
I discovered the error when I noticed a person with an OO blood type had parents with OO and BB blood types in the printout of the family.
Metadata
Metadata
Assignees
Labels
No labels