generated from mwc/lab_names
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.
8 lines
138 B
Python
8 lines
138 B
Python
# greetings.py
|
|
# ------------
|
|
# By MWC contributors
|
|
|
|
my_name =input("What is your name? ")
|
|
greeting = "Hello, " + my_name
|
|
print(greeting)
|