generated from mwc/lab_turtle
First experiment with turtle.
I tried playing around with turtle for the first time. I got the hang of it pretty quickly! First I got stopped by the extra functions, cause I didnt realise I should have added them to the list. Once I figured that out I could quickly replicate the code of the star and duplicate it at different angles around the screen. It was a very satisfying experience and I want to experiment more!
This commit is contained in:
82
drawing.py
82
drawing.py
@@ -6,17 +6,99 @@ from turtle import (
|
||||
penup,
|
||||
pendown,
|
||||
color,
|
||||
pensize,
|
||||
speed,
|
||||
setheading,
|
||||
circle,
|
||||
goto,
|
||||
begin_fill,
|
||||
end_fill,
|
||||
fillcolor,
|
||||
)
|
||||
|
||||
pensize(2)
|
||||
|
||||
color('red')
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
color('chocolate')
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
color('gold')
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
color('yellow green')
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
color('steel blue')
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
|
||||
penup()
|
||||
back(250)
|
||||
right(90)
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
pendown()
|
||||
|
||||
color('red')
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
color('chocolate')
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
color('gold')
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
color('yellow green')
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
color('steel blue')
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
|
||||
penup()
|
||||
right(180)
|
||||
forward(200)
|
||||
right(360 * 2 / 5)
|
||||
pendown()
|
||||
|
||||
color('red')
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
color('chocolate')
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
color('gold')
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
color('yellow green')
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
color('steel blue')
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
|
||||
penup()
|
||||
goto(100,100)
|
||||
forward(100)
|
||||
pendown()
|
||||
|
||||
color('red')
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
color('chocolate')
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
color('gold')
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
color('yellow green')
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
color('steel blue')
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
|
||||
|
||||
input()
|
||||
|
Reference in New Issue
Block a user