generated from mwc/lab_names
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:
@@ -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)
|
||||
|
||||
18
shapes.py
18
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)
|
||||
|
||||
|
||||
BIN
shapes.pyc
Normal file
BIN
shapes.pyc
Normal file
Binary file not shown.
Reference in New Issue
Block a user