Files
lab_names/shapes.py
2026-02-10 11:12:44 -05:00

29 lines
450 B
Python

# shapes.py
# ---------
# By MWC contributors
from turtle import *
def triangle(side_length):
forward(side_length)
left(120)
forward(side_length)
left(120)
forward(side_length)
left(120)
def rectangle(height, width):
forward(width)
left(90)
forward(height)
left(90)
forward(width)
left(90)
forward(height)
left(90)
## Write a function for each of these to draw the shapes.