generated from mwc/lab_names
29 lines
450 B
Python
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. |