generated from mwc/lab_names
value is what it is and name is what it refers to something else. Variables are useful in programing becouse once you give that value a name you dont have to write out the whole thing, you can just write the name and it will represnt the value.
8 lines
212 B
Python
8 lines
212 B
Python
# 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? "))
|
|
pi = 3.141592
|
|
print(radius * radius * pi) |