Your interactive graffiti game is working almost perfectly, but there’s one problem.
When you click the green flag, you’re also pressing down on the mouse, so the spritestamps even though you only meant to start the program. This video will show you howfix this error, or bug, and prevent this from happening.
Add a “wait” block, and set it to a very short time, like 0.2 seconds. Place it atthe beginning of the code just after the “clear” block, so the script waits to run until afterthe green flag has been clicked. Bugs are common in any code that computerscientists write. It is important to test your code often so that you can find the errorsbefore your users. Bugs in your code are a chance for you to learn and become an evenbetter computer scientist, so don’t worry when you find them.
Now, it’s your turn! Prevent the spray paint sprite from stampingwhen the flag is clicked by adding a “wait” block.