Aug-12-2018, 09:38 AM
(This post was last modified: Aug-12-2018, 09:38 AM by Axel_Erfurt.)
total = 0 counter = 0 while True: values = int(input("Enter the integer : ")) if values > 0: total += values counter += 1 else: if counter > 0: average = total / counter print('The average of the numbers entered is %d' %average) else: print('enter value > 0')