generated from mwc/lab_names
I did it! It was easier than the previous checkpoint. The only hurdle was the mathematics, not the coding haha.
24 lines
406 B
Python
24 lines
406 B
Python
# shapes.py
|
|
# ---------
|
|
# By MWC contributors
|
|
|
|
from turtle import forward, right
|
|
|
|
def triangle(side_length):
|
|
forward(side_length),
|
|
right(120),
|
|
forward(side_length),
|
|
right(120),
|
|
forward(side_length),
|
|
right(120),
|
|
|
|
def rectangle(height, width):
|
|
forward(width),
|
|
right(90),
|
|
forward(height),
|
|
right(90)
|
|
forward(width),
|
|
right(90),
|
|
forward(height),
|
|
right(90)
|