generated from mwc/lab_names
the radius from the user. Then I established the variable for pi as 3.141592653. Then I established a variable for area. It became pi * radius * radius. Finally Print area prompted the program to calculate. The best way I can describe it is that a vlue is the thing and the name is what we call it. Therefore, a name does not necessarily need to relate to the thing itself, rather it is simply what we refer to it as. One example of distinguishing the name from the value is with parents. While their names may be something like Susan and Jim, the value assigned to them by us (their children) is mom and dad. Variables are useful in programming because it makes things more adaptable. When complex data or code is housed in variables, it becomes flexible in that one does not have to complete extensive work every time it is called upon. |
||
---|---|---|
.commit_template | ||
.gitignore | ||
circle_area.py | ||
draw_with_shapes.py | ||
greetings.py | ||
poetry.lock | ||
pyproject.toml | ||
shapes.py | ||
test_shapes.py |