This commit is contained in:
sean
2026-02-09 23:18:05 -05:00
parent 07e5b6b5d0
commit e18aef5ee2
5 changed files with 39 additions and 3 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
source .venv/bin/activate

View File

@@ -4,3 +4,7 @@
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("The circle's area is")
print(circle_area)

View File

@@ -2,6 +2,6 @@
# ------------
# By MWC contributors
my_name ="Chris"
my_name = input("What is your name?")
greeting = "Hello, " + my_name
print(greeting)

View File

@@ -5,7 +5,20 @@
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)

18
square.py Normal file
View File

@@ -0,0 +1,18 @@
from turtle import forward, right
def square(size):
forward(size)
right(45)
forward(size)
right(45)
forward(size)
right(45)
forward(size)
right(45)
square(10)
forward(100)
square(50)
forward(100)
square(100)
input()