Add code to the X button to make it take away one vote from cat when it is clicked. Add a dog sprite and add the code to increase the votes for dog when it is clicked. Hint: you will need to create a variable and call it dog. Add another X button sprite and add the code to make it take 1 from the dog vote when it is clicked. Extension: If the sprite has no votes, i.e. votes = 0, clicking the X takes it to -1. Can you add code to stop this happening? Hint: you will need an IF block to check whether the number of votes for the sprite is more than 0.
Activity created for my computing group. Thanks to Raspberry Pi Foundation and Future Learn for the original.