generated from mwc/lab_names
completed names lab
it is undefined and is determined by you.functions can be anything you want it to be and can be as complicated as you want it to be.
This commit is contained in:
23
shapes.py
23
shapes.py
@@ -5,13 +5,26 @@
|
|||||||
from turtle import *
|
from turtle import *
|
||||||
|
|
||||||
def triangle(side_length):
|
def triangle(side_length):
|
||||||
right(45)
|
|
||||||
forward(side_length)
|
forward(side_length)
|
||||||
right(45)
|
right(120)
|
||||||
forward(side_length)
|
forward(side_length)
|
||||||
right(45)
|
right(120)
|
||||||
forward(side_length)
|
forward(side_length)
|
||||||
right(45)
|
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