generated from mwc/lab_names
checkpoint 2 - shapes
I did it! It was easier than the previous checkpoint. The only hurdle was the mathematics, not the coding haha.
This commit is contained in:
18
shapes.py
18
shapes.py
@@ -2,10 +2,22 @@
|
|||||||
# ---------
|
# ---------
|
||||||
# By MWC contributors
|
# By MWC contributors
|
||||||
|
|
||||||
from turtle import *
|
from turtle import forward, right
|
||||||
|
|
||||||
def triangle(side_length):
|
def triangle(side_length):
|
||||||
pass
|
forward(side_length),
|
||||||
|
right(120),
|
||||||
|
forward(side_length),
|
||||||
|
right(120),
|
||||||
|
forward(side_length),
|
||||||
|
right(120),
|
||||||
|
|
||||||
def rectangle(height, width):
|
def rectangle(height, width):
|
||||||
pass
|
forward(width),
|
||||||
|
right(90),
|
||||||
|
forward(height),
|
||||||
|
right(90)
|
||||||
|
forward(width),
|
||||||
|
right(90),
|
||||||
|
forward(height),
|
||||||
|
right(90)
|
||||||
|
Reference in New Issue
Block a user