generated from mwc/lab_names
I defined variables and make it output circle area
I did it indivudally but will check with groups when we find time to meet. 1 value is like valid things that stand for specific things, like Pi, like ture or false name does not represent the same things all the time. It might differ with time, culture, or how you define things variable is useful in programming as it allow people to freely define things and program based on their own needs Value is fixed and can only solve specific problems (like 5*2 = 10) while name is more flexible, it allows me to change different number later (like circle area).
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)
|
||||
@@ -2,6 +2,6 @@
|
||||
# ------------
|
||||
# By MWC contributors
|
||||
|
||||
my_name ="Chris"
|
||||
my_name = input("What is your name?")
|
||||
greeting = "Hello, " + my_name
|
||||
print(greeting)
|
||||
|
||||
7
poetry.lock
generated
Normal file
7
poetry.lock
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand.
|
||||
package = []
|
||||
|
||||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = "^3.10"
|
||||
content-hash = "53f2eabc9c26446fbcc00d348c47878e118afc2054778c3c803a0a8028af27d9"
|
||||
Reference in New Issue
Block a user