Hi and welcome to Day 2 of Google CS First Friends!
Today you will build a project to see just how well your friend knows you.
It’s called “Two Truths and a Lie.”
The program is based on a game in which you say 3 things about yourself.
2 of those things are true, and 1 of them is a lie.
Then, your friend has to guess which one is the lie.
Okay, so, like this?
(1) I was born on a farm (2) I was on a dance team and (3) I have 2 dogs.
Do you know which one is the lie?
You totally don’t have 2 dogs.
So, that was a lot like the game you will build in Scratch today.
B To make the game, you will use a computer science concept called conditional statements.
Conditionals are a way for computers to make decisions.
Conditional statements are used all the time in computer science.
For example, the startup company CODE2040 helps match students who are looking for jobs with companies that are looking for employees.
And the company founders and friends Laura Powers and Tristan Walker used conditional statements to check if a student and a company are a good match.
If they match, the program lets them know.
Otherwise, it doesn’t do anything.
Because of the way they are used, conditional statements are sometimes called if-else statements.
The computer checks to see if something is true.
If it is true, the computer does one action.
A Else, it does a different action.
Here’s an example of a conditional statement in Scratch: If the sprite is touching the edge of the stage, then the sprite will say “yes wall!”
Else, the sprite will say “no wall.”
You can program a conditional statement in Scratch using an if-else block, found in the “control” menu.
You’ll need them for today’s project!
Alright, I’m ready to start coding my Two Truths and a Lie game!
So, let’s get started!!
Jason will take you through the steps to build your project, and I’ll see you in the last video.
Now it’s your turn!
Open the starter project.
And sign in to Scratch.
- Open the starter project.
- Click remix.
- Sign in to Scratch.
- An Interview With CODE2040, A Non-Profit Out To Diversify Silicon Valley by Drew Olanoff (http://tctechcrunch2011.files.wordpress.com/2012/09/logo2.png?w=288&h=52) licensed under CC-BY 3.0 (http://creativecommons.org/licenses/by/3.0/)
- "Happy Go Lucky" by Scott Holmes (http://freemusicarchive.org/music/Scott_Holmes/Music_for_TV__Film/Happy_Go_Lucky) -- Licensed by CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/)
- "Lee farm sunset hdr 1.png" by Wally (https://commons.wikimedia.org/wiki/File:Lee_farm_sunset_hdr_1.png) -- Licensed by CC BY-SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0/deed.en) -- Image scaled up, cropping edges
- Code2040 Staff by (http://code2040.org/wp-content/uploads/2013/01/laura.jpg) licensed under CC-BY 3.0 (http://creativecommons.org/licenses/by/3.0/)
- "Lizzie and Murray - Two dogs in a field 2.jpg" by Panyd (https://commons.wikimedia.org/wiki/File:Lizzie_and_Murray_-_Two_dogs_in_a_field_2.jpg) -- Licensed by CC BY-SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0/deed.en) -- Image scaled up, cropping edges
- Code2040 Board by (http://code2040.org/wp-content/uploads/2013/01/tristan2.png) licensed under CC-BY 3.0 (http://creativecommons.org/licenses/by/3.0/)