generated from mwc/lab_names
The main changes came from accurately depicting
the two shapes needed so that the drawings could recreate the illustrated shapes. FOR CHECKPOINT 2 A function is similar to a variable in the sense that it can be used in place of longer blocks of code in order to reduce down on overall workload. Functions are also helpful in breaking down larger or harder problems because you can clearly notice which function is malfunctioning because of how clearly defined they are. For example, I was able to debug the issues with my drawings quickly because I could easily visualize where the errors originated from.
This commit is contained in:
parent
1ca30b862b
commit
b6a8c94a47
17
shapes.py
17
shapes.py
|
@ -5,7 +5,20 @@
|
||||||
from turtle import *
|
from turtle import *
|
||||||
|
|
||||||
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)
|
Loading…
Reference in New Issue