Should my list always end with 100?

The solution given by Codecademy is partially correct as it works only for input start = 91.
For rest it fails to include 100 as last element of list.
Also, below code is absolutely correct but for some reason it was not accepted, Therefore I had to use that solution button!! It’s frustrating.
#Write your function here
def every_three_nums(start):
e3 = list(range(start, 100, 3))
if e3[-1]!=100:
return e3
return e3
#Uncomment the line below when your function is done

Since we know how range works, it should be evident that if 100 is to be inclusive, we need an upper bound that is 1 more than that.

return list(range(start, 101, 3))
1 Like