QUESTION IMAGE
Question
imagine you are programming a simple calculator using scratch and you want to create a feature which adds a fixed number to an existing variable named \balance\. which of the blocks below will be the most appropriate to use for this feature?
To add a fixed number to the "balance" variable, we need a block that modifies the variable by a certain amount. The "change [balance] by [ ]" block is designed to increment (or decrement if a negative number is used) the value of the specified variable by the given number. The "set [balance] to [ ]" block would overwrite the variable's value, the first purple block is for displaying, and the blue "change x by [ ]" is for a different variable ("x") not related to "balance". So the "change balance by [ ]" block is appropriate.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
The block with the label "change balance by [ ]" (the third option in the list of blocks shown, the orange block that says "change balance by" with a blank for the number).