generated from mwc/lab_names
my_name = input("What is your name?") as instructed. In circle_area.py, I finished the program by assigning 3.141592653 to pi and then printing the value of pi * radius * radius, which is the area of a circle. Checkpoint 1: A value is what it is, but a name refers to a value. An everyday life situation where it's important to distinguish between a name and the value it refers to is when multiple people have the same name. For example, I went to high school with two people who were both Kevin Ng. Despite the jokes, they weren't interchangable, and the relationships I had with each were different. Variables can be useful in programming for a number of reasons. In the assignment text, pi was assigned the value 3.141592653. pi is much quicker and easier to type. Another reason a variable might be useful is because the value a name refers to might change. For example, the price of a fruit might change from $1 to $2, but we'd still refer to monetary amount as price. Checkpoint 2: Not there yet! Was asked to submit at checkpoint 1. |
||
---|---|---|
.commit_template | ||
.gitignore | ||
circle_area.py | ||
draw_with_shapes.py | ||
greetings.py | ||
pyproject.toml | ||
shapes.py | ||
test_shapes.py |