generated from mwc/lab_turtle
Original submission of lab, Hello message
I had some excitement while doing this program because I had some familiarity with python before completing this assignment. I ran into a few issues with figuring out the direction the turtle was moving, but once I was able to think about it from the perspective of the turtle, it made coding the motions easier. I also frequently saved and updated my work to check it and was able to troubleshoot pretty easily. I have some basic familiarity with RobotC, whcih is similar to Python.
This commit is contained in:
parent
2fb15fe106
commit
a3b0f345f1
98
drawing.py
98
drawing.py
|
@ -8,15 +8,93 @@ from turtle import (
|
|||
color,
|
||||
)
|
||||
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
penup()
|
||||
back(300)
|
||||
pendown()
|
||||
color("green")
|
||||
|
||||
#H
|
||||
right(90)
|
||||
forward(100)
|
||||
penup()
|
||||
back(50)
|
||||
pendown()
|
||||
left(90)
|
||||
forward(50)
|
||||
left(90)
|
||||
forward(50)
|
||||
back(100)
|
||||
|
||||
#E
|
||||
penup()
|
||||
right(90)
|
||||
forward(50)
|
||||
left(90)
|
||||
pendown()
|
||||
color("red")
|
||||
forward(100)
|
||||
right(90)
|
||||
forward(50)
|
||||
back(50)
|
||||
right(90)
|
||||
forward(50)
|
||||
left(90)
|
||||
forward(50)
|
||||
back(50)
|
||||
right(90)
|
||||
forward(50)
|
||||
left(90)
|
||||
forward(50)
|
||||
|
||||
#L
|
||||
penup()
|
||||
forward(50)
|
||||
left(90)
|
||||
forward(100)
|
||||
left(180)
|
||||
pendown()
|
||||
color("blue")
|
||||
forward(100)
|
||||
left(90)
|
||||
forward(75)
|
||||
|
||||
#L
|
||||
penup()
|
||||
forward(50)
|
||||
left(90)
|
||||
forward(100)
|
||||
left(180)
|
||||
pendown()
|
||||
color("orange")
|
||||
forward(100)
|
||||
left(90)
|
||||
forward(75)
|
||||
|
||||
#O
|
||||
penup()
|
||||
forward(50)
|
||||
pendown()
|
||||
color("purple")
|
||||
forward(50)
|
||||
left(90)
|
||||
forward(100)
|
||||
left(90)
|
||||
forward(50)
|
||||
left(90)
|
||||
forward(100)
|
||||
|
||||
|
||||
|
||||
|
||||
"""forward(100)
|
||||
right(360 * 2 / 5)
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
forward(100)
|
||||
right(360 * 2 / 5)
|
||||
"""
|
||||
input()
|
||||
|
|
Loading…
Reference in New Issue