Watch the code run
Every line lights up the step it causes. Step through it yourself.

1def print_heart():2for i in range(7):3for j in range(9):4if i == 0: star = j % 4 != 05else: star = abs(j - 4) <= 6 - i6if star: print("*", end="")7else: print(" ", end="")8print()
Variables
abs(8 - 4) <= 6 - 2, so star = True







