From 34d5739baf619b51f6ed83001045ddf07ea14f3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=94=A1=E5=8D=93=E8=80=98?= Date: Wed, 25 Sep 2024 10:55:04 -0400 Subject: [PATCH] It's little bit confusing when I only use the cod es without argumenting them for four times, but stacy told me it's because we have another programming running nested codes...that's interesting... --- circle_area.py | 3 +++ shapes,py | 0 shapes.py | 18 ++++++++++++++++-- shapes.pyc | Bin 0 -> 781 bytes 4 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 shapes,py create mode 100644 shapes.pyc diff --git a/circle_area.py b/circle_area.py index 513d6f7..e437630 100644 --- a/circle_area.py +++ b/circle_area.py @@ -4,3 +4,6 @@ print("This program will calculate the area of a circle.") radius = float(input("What is the circle's radius? ")) +pi=3.141592653 +circle_area=pi*radius*radius +print(circle_area) diff --git a/shapes,py b/shapes,py new file mode 100644 index 0000000..e69de29 diff --git a/shapes.py b/shapes.py index 731ec39..90824f1 100644 --- a/shapes.py +++ b/shapes.py @@ -5,7 +5,21 @@ 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 (height) + right(90) + forward (width) + right (90) + forward (height) + right(90) + forward (width) + right (90) + diff --git a/shapes.pyc b/shapes.pyc new file mode 100644 index 0000000000000000000000000000000000000000..35730273a8defb2315ca6172ae5097f6e61b1e65 GIT binary patch literal 781 zcmcJNJx{|h5QZ;l`Dg)&pMb;?F<^B^s1htJ9n!LNiA?M!R`XHW7lk4=_{Xr9JGVfE zgkY(Yd-K{l-JKq%^LEl#=kK!=HY=p>kiwmjD0%}Z046GgSAb~%s^d)vste<2kCM!a zRuqs!mWz~?gG=2|xFHDwJOjK05KtBs_3oc%G{!jMY9sSV>Mb6So7J|JRw0jJO_t+& zj3e4QqjXZ}D#JXYEqHNv=Tmf8uI%Y}BAizOaXHMB-nS)q9xcT567|LaM4=+E#dCUo!{iVc)M@%+r& z!ZW4v9#6~{5OeD_t$lL2W<(xVYt#<8^r)HDDS9xcv~eukU>MOT>d+zbWY}0NblfEy aGsy27+tsyQm9=ULea(N4n7 literal 0 HcmV?d00001