I forgot about the range function. I still managed to solve it; but now, seeing the one-line solution above, I realize I really overthought this one:
#Write your function here
def every_three_nums(start):
# creates an empty list
new_lst = []
# returns empty list if start is more than 100
if start > 100:
return new_lst
# otherwise new_lst starts at 'start'
else:
new_lst = [start]
# as long as the last number of the list is no more than 97...
while new_lst[-1] <=97:
# ...the function adds a number equal to the length of the list times 3 plus 'start'
new_lst.append(len(new_lst)*3 + start)
return new_lst