In Python turtle how can I write a timedelay
Question:
I am wondering how to create a time delay with the turtle function. Would it be part of a function that loops to create one when needed?
Answers:
Are you looking for something like this ?
import turtle
t = turtle
t.forward(100)
t.delay(1500)
t.forward(100)
Don’t hesitate to read the Documentation
As @dallonsi said, delay() is the function for slowing down the turtle, and if you want to specify a delay time, the number inside the () are milliseconds, so 1000 is one second. In @dallonsi’s example, 1500 is 1.5 seconds. Hope this helps.
I am wondering how to create a time delay with the turtle function. Would it be part of a function that loops to create one when needed?
Are you looking for something like this ?
import turtle
t = turtle
t.forward(100)
t.delay(1500)
t.forward(100)
Don’t hesitate to read the Documentation
As @dallonsi said, delay() is the function for slowing down the turtle, and if you want to specify a delay time, the number inside the () are milliseconds, so 1000 is one second. In @dallonsi’s example, 1500 is 1.5 seconds. Hope this helps.