Initial commit

This commit is contained in:
2026-01-26 00:59:04 +00:00
commit 1f6b519af1
9 changed files with 125 additions and 0 deletions

26
.commit_template Normal file
View File

@@ -0,0 +1,26 @@
# -----------------------------------------------------------------
# Write your entire commit message above this line.
#
# The first line should be a quick description of what you changed.
# Then leave a blank line.
# Then, taking as many lines as you want, answer the questions
# corresponding to your checkpoint.
#
# Checkpoint 1:
# - What is the difference between a value and a name? Describe
# a situation from everyday life where it's important to
# distinguish between a name and the value it refers to.
# - How might variables be useful in programming? In other
# words, why might you want to use a name rather than just
# using the value that it refers to?
#
# Checkpoint 2:
# - How is a function like a variable?
# - One of the most important problem-solving strategies in CS is
# breaking down big, hard problems into lots of small, easy problems.
# How might functions be useful in breaking down big, hard problems?
# Can you think of an example?

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
**/__pycache__/

6
circle_area.py Normal file
View File

@@ -0,0 +1,6 @@
# circle_area.py
# --------------
# By MWC Contributors
print("This program will calculate the area of a circle.")
radius = float(input("What is the circle's radius? "))

32
draw_with_shapes.py Normal file
View File

@@ -0,0 +1,32 @@
# draw_with_shapes.py
# -------------------
# By MWC contributors
from turtle import *
from shapes import triangle, rectangle
def flyto(x, y):
penup()
goto(x, y)
pendown()
flyto(-100, 0)
triangle(40)
triangle(60)
triangle(80)
triangle(100)
flyto(100, 0)
rectangle(10, 90)
rectangle(20, 80)
rectangle(30, 70)
rectangle(40, 60)
rectangle(50, 50)
rectangle(60, 40)
rectangle(70, 30)
rectangle(80, 20)
rectangle(90, 10)
hideturtle()
input()

7
greetings.py Normal file
View File

@@ -0,0 +1,7 @@
# greetings.py
# ------------
# By MWC contributors
my_name ="Chris"
greeting = "Hello, " + my_name
print(greeting)

16
pyproject.toml Normal file
View File

@@ -0,0 +1,16 @@
[project]
name = "lab-names"
version = "5.0.0"
description = ""
authors = [{ name = "Chris Proctor", email = "chris@chrisproctor.net" }]
requires-python = ">=3.10,<4.0"
readme = "README.md"
license = { text = "MIT" }
dependencies = []
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.uv]
package = false

11
shapes.py Normal file
View File

@@ -0,0 +1,11 @@
# shapes.py
# ---------
# By MWC contributors
from turtle import *
def triangle(side_length):
pass
def rectangle(height, width):
pass

19
test_shapes.py Normal file
View File

@@ -0,0 +1,19 @@
# test_shapes.py
# --------------
# By MWC contributors
from turtle import *
from shapes import triangle, rectangle
def flyto(x, y):
penup()
goto(x, y)
pendown()
flyto(-100, 0)
triangle(100)
flyto(100, 0)
rectangle(20, 80)
input()

7
uv.lock generated Normal file
View File

@@ -0,0 +1,7 @@
version = 1
requires-python = ">=3.10, <4.0"
[[package]]
name = "lab-names"
version = "5.0.0"
source = { virtual = "." }