Skip to content

Please update your browser

Your browser version is not supported by this site. CS First may not work properly. Learn more


Now that users can cast a vote, a sprite can win the talent show!

In this example, as soon as a spirte reaches 5 votes it says, “Yay! I win!”

To make this happen, the program needs to know that a sprite has received 5 votes.

To do this for the dog sprite, for example, drag out an “if-then” block, and change the “if” value to “dog likes = 5.” On the “then” side of the statement, put whatever celebration you want to make happen when the sprite wins.

In this case, the dog says “Yay! I win!” 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 5 times. The fifth time, the sprite should perform the winning action you chose, such as jumping and saying “Yay! I win!” Then, the vote count should go back to 0. Great!

Now it’s your turn. Make a sprite win when it receives 5 votes, and make it say or do something when it wins. Then, make the vote count reset to zero.

Choose an Add-On
Bust a Move
Learn how to earn the "Bust a Move" badge.
Energy Burst
Learn how to earn the "Energy Burst" badge.
Multiple Musicians
Learn how to earn the "Multiple Musicians" badge.
Clone Crazy
Learn how to earn the "Clone Crazy" badge.
Music Promoter
Learn how to earn the "Music Promoter" badge.
Vote on the Talent Show (Advanced)
Modify your project so you can vote for a talent show contestant.
Win the Show! (Advanced)
Make the winning performer celebrate their victory!
arrow_backward Back
Next arrow_forward
  1. See the talent show characters you can build.
  2. Find out what badges you can earn.