From d591ca625900a5f7a15a6a4554d9c4e2fb84ad55 Mon Sep 17 00:00:00 2001 From: kated Date: Mon, 9 Feb 2026 11:12:04 -0500 Subject: [PATCH] Wrote function triangle so that it draws a triangle with a side_length as the argument, and the function rectangle so that it draws a rectangle with a height and width as the two arguments. --- shapes.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/shapes.py b/shapes.py index 731ec39..d6eadaf 100644 --- a/shapes.py +++ b/shapes.py @@ -5,7 +5,19 @@ 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)