(Oct-16-2020, 10:56 PM)nhl66pens Wrote: Use the "Insert Python" icon, it's the first one on the second row of icons.
Thanks, I have now re-inserted my code with the indentation intact - see below. (also, I found a bug in my leapyear algorithm which I corrected since I posted the original code!)
def leapyear(year): truefalse=[] while i in range(len(year)): if not year[i]%4 and year[i]%100: truefalse.append(True) elif not year[i]%4 and not year[i]%100: if not year[i]%400: truefalse.append(True) else: truefalse.append(False) else: truefalse.append(False) return truefalse yearlist=[] for i in range(2000,2081): yearlist.append(i) print(leapyear(yearlist))