Professional Documents
Culture Documents
3
3
# A person can have either blood group A or B if one of their parents has blood group A or B
blood_group = 'A'
blood_group = 'B'
# If neither parent has blood group A or B, the person can have blood group O
else:
blood_group = 'O'
# If the person's blood group is A or B, they can also be positive or negative based on their
grandparents' blood groups
blood_group += '+'
else:
blood_group += '-'
# If the person's blood group is O, they can only be positive or negative based on their parents' blood
groups
else:
blood_group += '+'
else:
blood_group += '-'
return blood_group