generated from mwc/lab_names
A value is anything that is what it is, but a name
refers to something else. For example, your name refers to you, but you are not the same as your name, so you can change your name and still be the same person. Variables can be useful in programming when you are writing lots of code for a specific value. Using variables saves time and reduces the amount of clutter when writing lots of code for the specific value.
This commit is contained in:
@@ -4,3 +4,6 @@
|
||||
|
||||
print("This program will calculate the area of a circle.")
|
||||
radius = float(input("What is the circle's radius? "))
|
||||
pi = 3.141592653
|
||||
circle_area = pi * radius * radius
|
||||
print(circle_area)
|
||||
Reference in New Issue
Block a user