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 video, you will use a variable to keep track of the number of hits the batter gets. Variables in computer science are places to store changing values. In this case, the variable will store the number of hits, which will change each time the batter successfully hits the ball. First, create the variable. Click the “data” menu, and click “make a variable.” Name the variable something that makes sense, like “hits.” More than one sprite will need to use the contents of hits, so keep “for all sprites” selected. Click “OK.” In the top left corner of the stage, you should see an orange box labeled “hits.” It shows the current value stored in the variable “hits.”
At the moment, it’s “0.” A few new blocks for interacting with the variable have also appeared. The value of “hits” should change each time the baseball touches the red swung bat. From the “data” menu, drag the "change hits by 1" block into the “if/then” block. Click the flag to test the game, then hit the ball. Here comes the pitch – it’s outta here! Now you can see that the value of “hits” has increased. But wait… the batter only hit the ball once, and “hits” increased by more than one. What’s going on?
The code keeps checking if the baseball hits the red bat each time the loop runs. If the baseball touches the red bat for too long, the number of hits keeps increasing because the loop runs faster than the bat can change back.
To fix this, place a “wait” block from the control menu inside the “if/then” block. To figure out how long to wait, click on the bat sprite to check its code. Notice that the bat is red for 0.2 seconds, so enter 0.2 seconds in the “wait” block.
Test the game again. When you click the bat, it may switch the scripts over to the bat sprite's code. If this happens to you, just click the baseball again to keep programming it. The number of hits now goes up by only 1!
But, it didn’t start counting hits from 0. To fix this, go to the “data” menu, drag out a “set hits to zero” block, and place it at the beginning of the program just under the “when flag clicked” block. Click the flag to test the game again.
This time, hits start at 0 and increase by one when the bat hits the baseball. Much better!
Did you notice that there were lots of minor problems to tweak in your program? These are called bugs, and as you fix them you are “debugging” your program. This is an important step in programming! Computer scientists make mistakes all the time, so stick with it as you tweak your code. Here's the game plan: Add a variable named “hits” to your game. Then, keep track of the batter's hits using “change by.” Make the program wait 0.2 seconds before running the loop again. Finally, reset the number of hits to 0 at the beginning of each game. In the next video, you'll add analytics to your project.