In Storytelling, students use computer science to tell fun and interactive stories. Storytelling emphasizes creativity by encouraging club members to tell a unique story each day.
In Friends, students are encouraged to sign up with a friend or make a new friend in the club. Friends emphasizes teamwork by allowing club members to tell the story of how their friendship started and imagine a company together.
In Fashion & Design, students learn how computer science and technology are used in the fashion industry while building fashion-themed programs, like a fashion walk, a stylist tool, and a pattern maker.
In Art, students create animations, interactive artwork, photograph filters, and other exciting, artistic projects.
In Social Media, students create fun social media style applications and games while learning about the computer science concepts that enable these programs to work.
In Sports, students use computer science to simulate extreme sports, make their own fitness gadget commercial, and create commentary for a big sporting event.
In Music & Sound, students use the computer to play musical notes, create a music video, and build an interactive music display while learning how programming is used to create music.
In Game Design, students learn basic video game coding concepts by making different types of games, including racing, platform, launching, and more!
Students create fun and complex animated projects. This is an advanced curriculum, which means it teaches new concepts that are recommended for students who have already participated in at least two other CS First themes.
In this sample activity students animate an ocean wave to create a setting, then tell a story that takes place on the high seas.
In this sample activity students tell a story using the characters from Cartoon Network’s "The Amazing World of Gumball."
Be a designer and programmer – bring the Google logo to life using code.
In this add-on, you will program a music playlist that users can change!
To start, add music to your program. Click the stage, select the “sounds” tab and “choose sound from library.” Select the music loops category. Select a sound and click OK. Then, click the “choose sound from library” button again, and select another. Select as many tracks as you’d like to play in your program! Select each track and rename each track as a number, starting with the number 1.
Next, start playing one of the tracks when the flag is clicked. Select the scripts tab.
Drag out a “play sound until done” block. Above that, snap a when flag clicked block.
Click the green flag to test it. Great! But the music only plays once. It should keep playing.
To make the music keep playing, place a “forever” block around the “play sound until done” block. Test it out. Great! The music repeats over and over.
Next, make the tracks change. To change the music to the next track, you need to tell the program which track to play. Create a "music" variable. Select the data menu, and click "make a variable." Variables hold values, like numbers or words. In this example, the variable will hold the track number. Name the variable "music," and click OK.
Place the “music” block in the “play sound until done” block. Now, the program will play the sound with the name that is in the “music” variable. But right now the “music” variable is 0 and there is no track named 0!
Drag out a “set music to 0” block, and change its value to 1. Place the block just after the “when flag clicked” block. Click the green flag to test it. Great, it works!
Drag out a “change music by 1” block to try changing the track. Cool! When the current track finishes playing, the track changes. Snap a “when right arrow key pressed” block on top. To test it, click the flag and then press the right arrow key. Cool!
But the “music” variable will keep increasing forever, and you don’t have that many music tracks! To make the music variable stop increasing after playing all the tracks, add an “if then” block around the “change music by 1” block. Place a “less than” block inside the diamond-shaped space.
On the left side, place a “music” variable block. On the right side, this example has 4 tracks. Click the green flag to test it. Press the right arrow key multiple times.
Great! The “music” variable never goes beyond 3.
Next, program the left arrow to allow users to go backward through the tracks. Right click the “when right arrow key pressed” block stack, and select duplicate. Change the dropdown to say “left arrow key.” Change the green operator block to a “greater than” block.
On the left side, place a “music” variable block. On the right side, type 1. Type negative 1 in the “change music by” block. Click the flag to test the whole thing. Cool!
Pressing the right and left arrow keys changes the track.
But, there’s a bug in the program. The music should change *as soon as* the user presses the arrow key, not when the track finishes playing.
To fix the bug, place a “stop all sounds” block above the “change music by 1” blocks.
Test it out! Great, the music changes immediately when the arrow keys are pressed.
Last, make sure your users know that they can control the sound in the program! Click the “paint a new sprite” button. Use the text tool to type instructions, like “Use the arrow keys to change the music!” Now everyone will know how to use the playlist you created! Now, it’s your turn: Add several music tracks to your program. Program the sound to start when the flag is clicked. Allow the user to change tracks by pressing the arrow keys using “change by” and “stop all sounds” blocks.
Finally, paint a new sprite to show off the music playlist feature.