swimTimes = [45,36,99,54,34,56,76,45,56,60] #ask the user to enter time userTime = int(input("Enter a time between 49 and 60:")) #validate the user's time while userTime<49 or userTime > 60: userTime = int(input("Invalid data! Try again!!")) print("Thank you for entering a valid time!") #process the count #inititalise a variable to store the result count = 0 #process for i in range(len(swimTimes)): if userTime>swimTimes[i]: count = count + 1 #display a result print("There are ",count, "values less than ",userTime,".")