Aim of the puzzle: Update the value of a variable so that its name matches the correct value.
Walk through of solution: A variable has been named
theNumberFour which is misleading because its value is 23. Update the value of this variable to answer the question: “How many sides does a square have?”. Start by tapping the number 23 on the first line of code. Replace this with a new number by tapping the
num button and then typing the number 4. Now run the code to see the results. The variable named theNumberFour now actually represents the number 4.
Sample code solution:
(Tap below to reveal)
var theNumberFour = 4; print('How many sides does a square have?'); print(theNumberFour);