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...
This commit is contained in:
蔡卓耘 2024-09-25 10:55:04 -04:00
parent dc13d05c3e
commit 34d5739baf
4 changed files with 19 additions and 2 deletions

View File

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

0
shapes,py Normal file
View File

View File

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

BIN
shapes.pyc Normal file

Binary file not shown.