Need a code to calculate the mean of a list of numbers entered by users that stops when “stop” is entered, but am unsure how to use 'while' to continue the loop and 'if' to end.
number = int(input("Enter an integer"))
n=1
while number>0:
number+=int(input("Enter an integer"))
n+=1
print(number/n)