#average baby birthweights babyWeight = [1700,2030,4400,2900,1600,3000,3500,1560,2800,4600] numBabies = len(babyWeight) print(numBabies) totalWeight = 0 for i in range(10): totalWeight = totalWeight + babyWeight[i] print("babyWeight ",babyWeight[i]) averageWeight = totalWeight/numBabies print("Average baby weight ",averageWeight) totalWeight = 0 numUnderweight = 0 for i in range(10): if babyWeight[i] < averageWeight-500: totalWeight = totalWeight + babyWeight[i] numUnderweight +=1 averageUnderweight = totalWeight/numUnderweight print("Average underweight ",averageUnderweight) print("Number of underweight babies ",numUnderweight)