Answer:
The program in Python is as follows:
num_pints = int(input("Pints: "))
sum_pints = 0
for i in range(num_pints):
blood = int(input("Blood Donated: "))
sum_pints += blood
print("Average: ",sum_pints/num_pints)
Step-by-step explanation:
This prompts the user for number of pints
num_pints = int(input("Pints: "))
This initializes the sum to 0
sum_pints = 0
This iterates through the number of pints
for i in range(num_pints):
This gets input for each blood donated
blood = int(input("Blood Donated: "))
This adds up all blood donated
sum_pints += blood
This calculates and prints the average
print("Average: ",sum_pints/num_pints)