# Example 1: Healthy Newborn
# Pink body/blue limbs (1), HR >100 (2), Cry (2), Active (2), Good cry (2)
# Score = 9
apgar_score(1, 2, 2, 2, 2)
# Example 2: Distressed Newborn
# Blue (0), HR <100 (1), Grimace (1), Flaccid (0), Irregular resp (1)
# Score = 3
apgar_score(0, 1, 1, 0, 1)
Run the code above in your browser using DataLab