today i was working on the snake game i finished the coding i just need to fix some errors

for food in old_fruit:
if food.distance(snake) < 20:
time.sleep(1)
screen.clear()
screen.bgcolor("turquoise")
scoring.goto(0, 0)
here is a screenshot and some of the code thats supposed to make the game over screen but for some reason isnt working here is the video i used to help
i finished it the video just need to fix errors in my code