Remember: A variable is a named box that holds a value. The value can change.
Questions
1
A box called coins holds three. Which line takes one coin out?
🔤coins = coins - 1🔤coins == 4🔤coins = 1
2
A box called coins holds three. Which line adds one coin?
🔤coins == 4🔤coins = coins + 1🔤coins = 3 - 1
3
A box called coins holds three. Which line takes one coin out?
🔤3 = coins🔤coins = 3 - 1🔤coin = coins + 1
4
A box called coins holds three. Which line has a bug?
🔤coins = coins - 1🔤3 = coins🔤coin = coins + 1
5
A box called coins holds three. Which line has a bug?
🔤1 + coins = coins🔤coins == 4🔤coins = coins - 1
6
Which idea about variables is true?
🏷️the name on a variable is how Python finds it🔒a variable keeps its first value forever🔢a variable can only hold a number
7
A box called coins holds three. Which line leaves the box holding three?
🔤1 + coins = coins🔤coins = 1🔤coins == 4
8
Which idea about variables is true?
🔒a variable keeps its first value forever⚖️one equals sign checks if two things are equal📦a variable is a named box that holds a value
9
A box called coins holds three. Which line adds one coin?
🔤coins = 1 + coins🔤coins + 1🔤1 + coins = coins
10
⬅️Is it true that one equals sign puts a value in a variable?
YesNo
11
Which idea about variables is not true?
🔄a variable can change while the program runs⚖️one equals sign checks if two things are equal📦a variable is a named box that holds a value
12
Which idea about variables is not true?
📦a variable is a named box that holds a value🔒a variable keeps its first value forever🔄a variable can change while the program runs
Scan the code at the top to mark this sheet on screenTake a photo of your answers or type them. It is marked for you automatically, and your score is kept.