William M. answered 12/31/22
STEM Tutor (Ph.D, Northwestern) | Algebra–Calc, Bio, Chem, Physics, CS
def even_odd(n):
if n < 0:
raise ValueError(f'{n} is less than 0')
for i in range(n + 1): # must use n + 1 otherwise n will be skipped
# f'...' is similar to C language printf() function:
# print( f'...') ... get it ?
print(f'{i:2} {"EVEN " if i % 2 == 0 else "ODD "}')
print()