#write a program that generates random int between -10 and 10 #till user say STOP #programs finds the number of ints generates and their average import random def main(): stop_indicator=input("enter STOP to stop random generation, anything else will continue ") counter=0 total=0 while(stop_indicator!='STOP'): num=random.randint(-10, 10) print(num) total+=num counter+=1 stop_indicator=input("enter STOP to stop random generation, anything else will continue ") if(counter>0): print(counter, "numbers generated and their average is", total/counter) else: print("nothing was generates") main()