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.
Learn how to earn the "Bust a Move" badge.
Learn how to earn the "Energy Burst" badge.
Learn how to earn the "Multiple Musicians" badge.
Learn how to earn the "Clone Crazy" badge.
Modify your project so you can vote for a talent show contestant.
Make the winning performer celebrate their victory!
Sign in to track your progress and earn badges