Learn
In Python, and when programming in general, we need to build systems for dealing with data that changes over time. That data could be the location of a plane, or the time of day, or the television show you’re currently watching. The only important thing is that it may be different at different times. Python uses variables to define things that are subject to change.
greeting_message = "Welcome to Codecademy!" current_excercise = 5
In the above example, we defined a variable called greeting_message
and set it equal to the string “Welcome to Codecademy!”. It also defined a variable called current_exercise
and set it equal to the number 5.
Instructions
1.
Create a variable called todays_date
and assign a value that will represent today’s date to that variable.
Take this course for free
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.