Welcome back, team. It’s time for activity 3 of Google CS First Sports. Get pumped tocreate a fun and exciting Net Sports game of your choice. You can choose tennis,volleyball, or badminton. Fun fact: badminton is technically the fastest sport.
The serving players can hit the birdie up to 206 mph.
In this activity, you’ll use an important computer science concept called conditionalstatements, also called “if-then” statements. Computers make decisions based on the instructionsyou give them. The code block that tells a computer to make a decision is called a conditional.
A conditional statement has two parts: the condition and the instructions to run if thecondition is true. You can frame the decisions you make in “if”statements. “If it is cold outside, you put on a jacket.” It being cold outsideis the condition, and the instruction you run if it is cold is “wear a jacket”In soccer, if you want power, you kick with the front of your foot. If you want accuracy,you kick with the inside of your foot. Computer scientists like you have helped athletesimprove their performances with apps that track their movements. When you connect themiCoach Smart Ball from Adidas to a mobile device like a phone or tablet, it keeps trackof the speed and spin of the soccer ball after you kick it.
The miCoach app tells you how close to the professional kick you came. If your kick wasvery close to the pros, you’ll see 5 stars. If it’s much faster or slower, or has toomuch or too little spin, you can get half a star.
The Zepp sensor does something similar for baseball. When connected to a bat, it tracksthe path of that bat and the speed of the swing. If the bat touches the ball, that portionof the swing is colored red. If the batter moves the screen, the app shows the ball fromdifferent angles.
As you can see by these examples, the conditionals you will learn today are used in all typesof athletic devices.
As you can see, it helps you measure, it helps you motivate, and it helps you maximize your game.
Pretty sweet, huh?
The app connected to those shoes uses a lot of conditionals.
If the athlete taps his or her foot, the app adds “foot fires."
If the athlete jumps, the app uses information from the sensors in the shoesto test how high the jump was. This activity will use conditionals to decidewhat to do “if” the ball sprite touches a racket. You’ll use the same concept thatthese gadgets use to help improve athletes’ performances!
Just like in the last activities, you've got a number of sports to choose from. You canchoose to work with tennis, volleyball, or badminton – click the link to open the starterproject in a new tab. Click “Remix,” and sign in with the usernameand password on your CS First club pass in your Passport.
Here’s the game plan: First, open the starter project.
Then, remix it, and sign in. Once you've done that, return to this tab,click the "next" arrow, and move on to the next video to start coding your project.
Connexion pour suivre tes progrès et gagner des badges
Zepp Baseball Training Tool Launch Demonstration - ZeppTraining.com de SkillTrax Training 1 (https://www.youtube.com/watch?v=gZjDcX66EV0) sous licence CC BY-NC 3.0 (http://creativecommons.org/licenses/by-nc/3.0/)
NIKE+ Basketball & NIKE+ Training - Launch & Demos Feb 2012 de Red Robot - Intelligent Distribution (https://www.youtube.com/watch?v=zqaf51xNBLk) sous licence CC-BY 3.0 (http://creativecommons.org/licenses/by/3.0/)
miCoach by Adidas Micoach (http://micoach.adidas.com/smartball)