I changed the greeting to allow the user to say their name. It will then greet them by their name. I also allowed the code to find the area of a circle when the user gives the radius.

Checkpoint 1:
The difference between a value and a name is that a value is the thing that it is and a name refers to seomthing else.  Values can be floats, ints, strings, or booleans.  In real life you would call someone by their name, not by describing them so you would call someone by their name, not value.  Variables are important in coding because they allow you to not have to repeat lines of code over and over again.  Once you make a variable you can call it multiple times and it will remember the code associated with it.
This commit is contained in:
jwberent
2025-09-05 14:34:08 -04:00
parent 53073b538d
commit f0f2557b00
3 changed files with 11 additions and 1 deletions

View File

@@ -2,6 +2,6 @@
# ------------
# By MWC contributors
my_name ="Chris"
my_name =input("What is your name? ")
greeting = "Hello, " + my_name
print(greeting)