Skip to content

Commit 2040881

Browse files
authored
Update TurtleRace.py
1 parent 3436d1e commit 2040881

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

TurtleRace/TurtleRace.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
show.penup()
3434
show.goto(-200, -150)
3535
show.color("red")
36-
if winner == UserInput:
36+
if winner.lower() == UserInput.lower():
37+
print("Your turtle won!")
3738
show.write("Your turtle won!")
3839
else:
40+
print(f"Your turtle lost, the winner is {winner} turtle!")
3941
show.write(f"Your turtle lost, the winner is {winner} turtle!")
40-
time.sleep(1)
41-
show.clear()
4242
runner.forward(random.randint(0, 10))
43-
scr.exitonclick()
43+
scr.exitonclick()

0 commit comments

Comments
 (0)