WARNING: This program has a bug, which means we need to fix it! We want the sprite to say the return value.
RULE: Variables created INSIDE a function can only be used INSIDE that same function unless the function returns a value. In this example, the return variable, my_answer, holds the return value, which is stored in product.
- Click Run and read the error message to debug the program.
- Debug the program so that the sprite says the value returned by the function.
To navigate the page using the TAB key, first press ESC to exit the code editor.