22. Hi wait

We learned before how to create a square using the repeat loop , now let's do it
create a square size 50 with turning right
We just enter the loop and the commands were done sequentially so fast that we couldn't follow what's going on inside , in order to follow lets enter the command wait to the loop ,
repeat 4 [wait fd 50 rt 90]
let's write the following command, Let's see where exactly does the turtle wait :)
fd 50 wait rt 90 wait fd 100 rt 30 fd 30 wait fd 200 rt 76 wait wait fd 50
The wait time is defined in milliseconds when the default is 200 (0.2 seconds) in order to set different waiting time we can use the command , setwaittime X or swt X when x represent the time of milisecond
set the waiting time to one second and create a square with wait (like in section 2)
Now we will create a program when we set the wait time to 100 milliseconds and create a square and then we set it to 1 second , notice the differences
cs swt 100 repeat 4 [wait fd 50 rt 90] pu fd 100 pd swt 1000 repeat 4 [wait fd 50 rt 90]
TurtleAcademy learn programming for freeYour browser is not supporting canvasWe recomand you to use Chrome or Firefox browsers