Rocket sticks a note on his door. It says mood equals happy. "This is my variable!" he says.
Raven smiles. "What do you notice about your mood by bedtime?" she asks.
Nova blinks. "Update it four times," she says. "Morning, lunch, afternoon, and bedtime."
Let's make our own mood variable and track it all day.
Tape a sticky note to a door. That's your VARIABLE: mood.
Update it 4 times today: morning, lunch, afternoon, bedtime.
| Time | mood = ? |
|---|---|
| Morning | ____________ |
| Lunch | ____________ |
| Afternoon | ____________ |
| Bedtime | ____________ |
| Statement | True or false? |
|---|---|
| A variable can hold a word, like happy. | ? |
| score = score + 1 means put the new total back in score. | ? |
| You need a third box to swap two values safely. | ? |
| Once a box has a value, it can never change. | ? |
Week 5: FUNCTIONS. Give a group of steps a name and reuse them.