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:
parent
b5694ddff5
commit
a5b685f7aa
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)
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue