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:
Seoyeon Lee 2024-09-10 18:28:14 -04:00
parent b5694ddff5
commit a5b685f7aa
1 changed files with 18 additions and 2 deletions

View File

@ -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)