This is the question
** **Crte a function called every_three_nums
that has one parameter named start
.
The function should return a list of every third number between start
and 100
(inclusive). For example, every_three_nums(91)
should return the list [91, 94, 97, 100]
. If start
is greater than 100
, the function should return an empty list.**
This is my solution
def every_three_nums(start):
if start < 100:
lst = list(range(start, 101, 3))
return lst
else:
lst = []
return lst
print(every_three_nums(91))
While this produces the correct answer I’m getting a error
every_three_nums(100)
should have returned [100]
, and it returned
Can you guys help? what’s wrong here?