commit 1c25d918f5b6545ca506ae6717d6e734c416a75e Author: Chris Proctor Date: Sat Jul 15 17:09:31 2023 -0400 Initial commit 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..c3c782f --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,15 @@ +[tool.poetry] +name = "lab-names" +version = "0.1.0" +description = "" +authors = ["Chris Proctor "] +readme = "README.md" +packages = [{include = "lab_names"}] + +[tool.poetry.dependencies] +python = "^3.10" + + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" 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() + +