Please update your browser
Your browser version is not supported by this site. CS First may not work properly.
Now that users can cast a vote,
a sprite can win the talent show.
In this example, as soon as a sprite reaches five votes,
it says, oh yeah.
To make this happen, the program needs to know
that the sprite has received five votes.
For example, take and if then block
and drag it to the dog sprite,
and change the if value to dog votes equal five.
On the then side of the statement,
add a unique celebration for when the sprite wins.
In this case, the dog says, oh yeah, then jumps.
After that happens the vote count resets to zero.
Test your code.
Click the button to vote, for the sprite you coded for
five times, the 5th time,
the sprite should perform the winning action you chose,
such as jumping and saying oh yeah.
Then the vote count should go back to zero, cool.
Now it's your turn.
Make a sprite win, when it receives five votes.
And make it say or do something when it wins.
Then make the vote count reset to zero.