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?

Asked By: Brian Mason

||

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

Answered By: dallonsi

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.

Answered By: Anna Song
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.