Advanced Turtle Challenges
Draw a multi-point star - here is an example for 15 sides
Can you adapt this to work for any number of sides, including odd and even numbers.
This is harder than it looks.
This is harder than it looks.
Draw a spiral
Draw a multi-coloured spiral
This is a bit harder.
First you need to set up a list of colour values tcolours = ("red","green","blue","yellow") tcolours is just a variable, but it's a special type of variable called a 'list'. It's a fixed list with four values:
tcolours[0] is "red" tcolours[1] is "green" tcolours[2] is "blue" tcolours[3] is "yellow" we can use this variable in our turtle.color() command. We can also use a control variable to change between 0,1,2 and 3 so that we get different colours colorvalue = 0 |
Draw a clock face
For this challenge you'll need to use turtle.penup(), turtle.goto() and turtle.pendown(). You can also use turtle.stamp() to draw the turtle pictures.
The following line will put the turtle in the middle of the screen, without changing the direction that it's pointing: turtle.goto(0,0) The rest is up to you :-)
|
Tell the time - make a working clock
You can get the time from Python.
To do that you'll need to add an additional import command on the very first line of your program import datetime, turtle Then ask python to find the current time. I've used a variable called 'currenttime' but you can call it anything
currenttime = datetime.datetime.now() From this you can find the hours and the minutes
currenttime.hour There's more, you can get seconds, day of the week etc:
More turtle challenges |