Answer
Enter an integer, the input ends if it is 0 ....
The Number of Positives is ....
The Number of Negatives is ....
The Total is ....
The Average is ....
Work Step by Step
positives = 0
negatives = 0
count = 0
total = 0
n = eval(input("Enter an integer, the input ends if it is 0: "))
while n!=0:
if n > 0:
positives += 1
else:
negatives += 1
count += 1
total += n
n = eval(input("Enter an integer, the input ends if it is 0: "))
print("The number of positives is",positives)
print("The number of negatives is",negatives)
print("The total is",total)
print("The average is",total*1.0/count)