generated from mwc/lab_names
function can be defied by a person or a user, thus it is not fixed just like a variable.
To achieve a big goal, a person need to take multiple small steps. Often, a math question requires lots of smaller steps to get a final answer. In life, we often need to work on a small tasks to make somewhat meaningful outcomes.
This commit is contained in:
20
shapes.py
20
shapes.py
@@ -5,7 +5,23 @@
|
||||
from turtle import *
|
||||
|
||||
def triangle(side_length):
|
||||
pass
|
||||
forward(side_length)
|
||||
right(120)
|
||||
forward(side_length)
|
||||
right(120)
|
||||
forward(side_length)
|
||||
right(120)
|
||||
|
||||
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