Instruction
Great! You can change the values of variables at any moment. Take a look:
current_age = 25 print(current_age) current_age = 26 print(current_age)
The code above will print 25 and then 26. If you want a new value for your variable, simply use the equals operator (=) again.
Exercise
- Create a variable named
moodwith a string value:I feel good today. - Print the value of
mood. - Assign a new value to
mood:I feel bad today. - Print the
moodvariable again.
Stuck? Here's a hint!
You will need four lines of code. Remember that string values must be surrounded with either single or double quotation marks:
mood = 'I feel good today'



