From b1c6aa6a43732d5f06357d96a33aa7277dbf15d3 Mon Sep 17 00:00:00 2001 From: jmuenzer Date: Fri, 23 Jan 2026 18:27:28 +0000 Subject: [PATCH] Initial commit --- .commit_template | 26 ++++++++++++++++++++++++++ .gitignore | 1 + circle_area.py | 6 ++++++ draw_with_shapes.py | 32 ++++++++++++++++++++++++++++++++ greetings.py | 7 +++++++ pyproject.toml | 16 ++++++++++++++++ shapes.py | 11 +++++++++++ test_shapes.py | 19 +++++++++++++++++++ uv.lock | 7 +++++++ 9 files changed, 125 insertions(+) create mode 100644 .commit_template create mode 100644 .gitignore create mode 100644 circle_area.py create mode 100644 draw_with_shapes.py create mode 100644 greetings.py create mode 100644 pyproject.toml create mode 100644 shapes.py create mode 100644 test_shapes.py create mode 100644 uv.lock diff --git a/.commit_template b/.commit_template new file mode 100644 index 0000000..6ff5246 --- /dev/null +++ b/.commit_template @@ -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? + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..61f2dc9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +**/__pycache__/ diff --git a/circle_area.py b/circle_area.py new file mode 100644 index 0000000..513d6f7 --- /dev/null +++ b/circle_area.py @@ -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? ")) diff --git a/draw_with_shapes.py b/draw_with_shapes.py new file mode 100644 index 0000000..38eb934 --- /dev/null +++ b/draw_with_shapes.py @@ -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() + + + diff --git a/greetings.py b/greetings.py new file mode 100644 index 0000000..2d878a6 --- /dev/null +++ b/greetings.py @@ -0,0 +1,7 @@ +# greetings.py +# ------------ +# By MWC contributors + +my_name ="Chris" +greeting = "Hello, " + my_name +print(greeting) diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..16329ef --- /dev/null +++ b/pyproject.toml @@ -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 diff --git a/shapes.py b/shapes.py new file mode 100644 index 0000000..731ec39 --- /dev/null +++ b/shapes.py @@ -0,0 +1,11 @@ +# shapes.py +# --------- +# By MWC contributors + +from turtle import * + +def triangle(side_length): + pass + +def rectangle(height, width): + pass diff --git a/test_shapes.py b/test_shapes.py new file mode 100644 index 0000000..7c19a7b --- /dev/null +++ b/test_shapes.py @@ -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() + + diff --git a/uv.lock b/uv.lock new file mode 100644 index 0000000..d5e7ac3 --- /dev/null +++ b/uv.lock @@ -0,0 +1,7 @@ +version = 1 +requires-python = ">=3.10, <4.0" + +[[package]] +name = "lab-names" +version = "5.0.0" +source = { virtual = "." }