Files
lab_turtle/drawing.py
jwberent a36a6789f4 I kept the star and added a square with different colors for sides and a triangle with different colors for sides.
It was rewarding to write this code.  It was fun to see it do what I wanted it to accomplish.  It was rewarding because I tried to make the triangle and I had the sides at 60 degrees but then saw I needed to make them 120 degrees.  It was nice to be able to figure out my issue and solve it.
2025-08-30 14:01:24 -04:00

50 lines
596 B
Python

from turtle import (
forward,
back,
left,
right,
penup,
pendown,
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()
forward(150)
pendown()
color("red")
forward(100)
right(90)
color("green")
forward(100)
right(90)
color("blue")
forward(100)
right(90)
color("orange")
forward(100)
right(90)
penup()
forward(150)
pendown()
color("yellow")
forward(50)
right(120)
color("red")
forward(50)
right(120)
color("blue")
forward(50)
right(120)
input()