Hello, I have a problem with Turtle library I have this code ```python from turtle import Turtle, Screen import time FONT = ("Courier", 24, "normal") COUNTDOWN_FONT = ("Courier", 24, "normal") class Scoreboard(Turtle): # class to get hold of scoreboard def __init__(self): super().__init__() self.level = 1 self.hideturtle() self.penup() self.goto(-270, 250) self.update_scoreboard() def update_scoreboard(self): self.clear() self.write(f"Level: {self.level},", align="left", font=FONT) def increase_level(self): # Increase the level when turtle hits the wall self.level += 1 self.update_scoreboard() def game_over(self): self.goto(0, 0) self.write("Game Over!!", align="center", font=FONT) def show_congratulations(self): self.clear() # Clear the screen before writing self.write("Congratulations!", align="center", font=FONT) print("Congratulations message displayed.") def show_countdown(self): self.clear() for i in range(3, 0, -1): self.goto(0, -30) self.write(f"Next level in {i},...", align="center", font=COUNTDOWN_FONT) print(f"Countdown: {i},") time.sleep(1) # Wait for 1 second before displaying the next countdown print("Countdown finished.") ``` And then Im using it here ```python if player.ycor() > 285: player.reset_turtle() scoreboard.show_congratulations() # Show congratulations message time.sleep(1) scoreboard.show_countdown() # Show countdown car_manager.level_up_speed() # level up the speed of car whenever turtle collide with wall scoreboard.increase_level() # level up the score whenever turtle collide with the wall ``` When my turtle gets to the finish no congratulation message and not countdown is written However in my console where I debug it it wrote
I'd try getting rid of the `time.sleep` calls. `sleep`ing threads doesn't tend to mix well with UIs.