Skip to content

Please update your browser

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

1. Two Truths & A Lie

Transcript

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.

That’s right!

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.

That’s right!

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.

That’s right!

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.

Click remix.

And sign in to Scratch.

Next arrow_forward
Instructions
  1. Open the starter project.
  2. Click remix.
  3. Sign in to Scratch.