generated from mwc/lab_turtle
I experimented with the turtle command using the pensize, color, circle, set position, and text.
This actually was theraputic for me. I enjoyed the trial and error aspect and experimenting with the program to get my shapes exactly where I wanted them to be. I wanted to experiment with adding text to the program, and it was interesting to see how the text was coded.
This commit is contained in:
51
drawing.py
51
drawing.py
@@ -7,29 +7,40 @@ from turtle import (
|
|||||||
pendown,
|
pendown,
|
||||||
color,
|
color,
|
||||||
write,
|
write,
|
||||||
setposition
|
setposition,
|
||||||
|
circle,
|
||||||
|
goto,
|
||||||
|
fillcolor,
|
||||||
|
pensize
|
||||||
)
|
)
|
||||||
|
|
||||||
color('red')
|
pensize(10)
|
||||||
right(45)
|
color('blue')
|
||||||
forward(100)
|
circle(50)
|
||||||
right(45)
|
|
||||||
forward(100)
|
|
||||||
right(45)
|
|
||||||
forward(100)
|
|
||||||
right(45)
|
|
||||||
forward(100)
|
|
||||||
right(45)
|
|
||||||
forward(100)
|
|
||||||
right(45)
|
|
||||||
forward(100)
|
|
||||||
right(45)
|
|
||||||
forward(100)
|
|
||||||
right(45)
|
|
||||||
forward(100)
|
|
||||||
penup()
|
penup()
|
||||||
setposition(-145,-160)
|
setposition(110,0)
|
||||||
|
pendown()
|
||||||
|
color('black')
|
||||||
|
circle(50)
|
||||||
|
penup()
|
||||||
|
setposition(220,0)
|
||||||
|
pendown()
|
||||||
|
color('red')
|
||||||
|
circle(50)
|
||||||
|
penup()
|
||||||
|
setposition(55,-60)
|
||||||
|
pendown()
|
||||||
|
color('yellow')
|
||||||
|
circle(50)
|
||||||
|
penup()
|
||||||
|
setposition(165,-60)
|
||||||
|
pendown()
|
||||||
|
color('green')
|
||||||
|
circle(50)
|
||||||
|
penup()
|
||||||
|
setposition(25,-140)
|
||||||
|
color('maroon')
|
||||||
style = ('Times New Roman', 75, 'bold')
|
style = ('Times New Roman', 75, 'bold')
|
||||||
write('STOP', font=style)
|
write('USA!', font=style)
|
||||||
|
|
||||||
input()
|
input()
|
||||||
|
|||||||
Reference in New Issue
Block a user