value = input("Enter an integer: ") counter = 0; # initialize an accumulator variable for i in range(1, value): if i % 5 == 0: # if the index is divisible by 5 counter = counter + 1; # add it to the accumulator print "There are", counter, \ "numbers divisible by 5 in the range 1 through", value