Input a list of pepole ages from the user (terminated by 0) and find the avarage?

To find the average of a list of ages inputted by the user, you can follow these steps:

1. Initialize a variable `total` to keep track of the sum of ages and set it to 0.
2. Initialize a variable `count` to keep track of the number of ages entered and set it to 0.
3. Start a loop to receive input from the user until they enter 0 (to terminate the input).
4. Inside the loop, ask the user to input an age.
5. Convert the user's input into an integer and store it in a variable `age`.
6. Add `age` to the `total` variable.
7. Increment `count` by 1 to keep track of the number of ages entered.
8. Continue the loop until the user enters 0.
9. Calculate the average by dividing the `total` by `count`.
10. Display the average to the user.

Here's an example implementation in Python:

```python
total = 0
count = 0

while True:
age = int(input("Enter an age (or 0 to terminate): "))

if age == 0:
break

total += age
count += 1

if count != 0:
average = total / count
print(f"The average age is {average:.2f}")
else:
print("No ages were entered.")
```

By following these steps, you will be able to input a list of ages from the user and calculate the average.