(bouncy guitar music)
Welcome to day three of CS First Storytelling.
Today, you will build a story set on a stormy day, while you learn about two important computer science concepts, randomness and looping.
Computer scientists use randomness to generate numbers that don't have a pattern.
Imagine you need to make a computer program that plays a simple game, like Rock Paper Scissors.
How would you program the computer to decide when to play Rock, or when to play a Scissors?
To program a games that is completely unpredictable, you need randomness.
Almost all video games are programmed with elements of randomness to make sure that players cannot make predictions.
Imagine playing a game where you could always predict what would happen next.
That wouldn't be very much fun.
Randomness is also important to computer scientists who work in cryptography.
Cryptography is what keeps the digital communication safe from hackers who want to steal it.
Now there's another important concept to encryption that we have to consider, the art of being random.
Now it sounds easy, but being random's actually really hard.
If you say to a computer be random, it has a program to do that, which is quite logical and not very random.
So we have to look at other ways to get that stuff.
So I went out on a little mission to build some of these devices, and I'm gonna share one of them with you now.
I took a smoke alarm, and a smoke alarm contains a lovely little radioactive source.
And nature provides these wonderfully random radioactive emissions.
So I took this and, using an incredibly expensive, high-tech containment device, I connected it to my computer with a Geiger counter and collected data from this wonderful source.
And the net result.
(Geiger counter clicking)
I'm the only one that's excited about that, right?
To a cryptographer, that is brilliant.
It's pure randomness.
Cryptographers, people who do cryptography, insure that, when someone uses their credit card in a store, or checks their bank account online, or even just stores personal information on a place like Facebook, that only specific people can see their personal information.
Cryptographers use randomness to generate really, really ridiculously long, unpredictable passwords called keys that protect the messages that computers send and receive.
This project today will also introduce loops.
Loops allow computer scientists to program a computer to repeat a group of instructions.
The loops in Scratch are forever, repeat 10, and repeat until, all of which are found in the Control menu.
Today's story will require you to build a moving setting.
A setting is the time and place where a story happens and gives storytellers a chance to set the scene and tell the audience a little bit about what to expect from the story.
Look at today's example project.
Imagine what type of story might take place in a rainy and stormy setting like this.
Who would possibly be out in a storm like this?
Are the characters doing something bad?
Are they lost?
After programming the setting, you'll create a story in this dark, mysterious place.
Right now, you'll learn how to open the starter project, remix it, and sign into Scratch.
After watching this video, you'll get the chance to try these steps on your own.
To begin, click they Starter Project link next to this video, and sign in using the information from your club pass.
Remember, if you don't sign in, your project won't save.
Click the CS First tab to switch back to this page, and then click the green arrow to move on to the next video.
In the next video you'll begin programming the rain to fall.
Now it's your turn.
Open the starter project link next to this page and Sign In.
Click Remix and then, once you've completed these steps, click the CS First tab to switch back to this page, and then click the green arrow to move on to the next video.
- Open the starter project link.
- Click remix.
- Sign in.
- "Credit Cards" by Sean MacEntee (https://www.flickr.com/photos/smemon/12696032183/) -- Licensed by Creative Commons Attribution 2.0 Generic (https://creativecommons.org/licenses/by/2.0/) -- Image not modified
- "Depiction of a Futuristic City" by Jonas de Ro (https://commons.wikimedia.org/wiki/File:Depiction_of_a_futuristic_city.jpg) -- Licensed by Creative Commons Attributions-Share 3.0 Unported (https://creativecommons.org/licenses/by-sa/3.0/deed.en) -- Image scaled, cropping edges
- "Steal Password" by Psyomjesus (https://commons.wikimedia.org/wiki/File:Steal_password.jpg) -- Licensed by Creative Commons Attribution-Share Alike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/deed.en) -- Image scaled, cropping edges
- "Energy" by bensound.com (http://www.bensound.com/royalty-free-music/track/energy)
- "James Lyne: Cryptography and the Power of Randomness" by TEDTalentSearch (https://www.youtube.com/watch?v=SAAflrIp__E) -- Licensed by Creative Commons Attributions-Share 3.0 Unported (https://creativecommons.org/licenses/by/3.0/legalcode) -- Video trimmed to needed length
- "Rock-Paper-Scissors" by Enzoklop (https://commons.wikimedia.org/wiki/File:Rock-paper-scissors.svg) -- Licensed by Creative Commons Attributions-Share 3.0 Unported (https://creativecommons.org/licenses/by-sa/3.0/deed.en) -- Image not modified
- "Tales Runner Video Game Randomness" by DAB Games (https://www.youtube.com/watch?v=YbQIK_QWeJM) -- Licensed by Creative Commons Attributions-Share 3.0 Unported (https://creativecommons.org/licenses/by/3.0/legalcode) -- Video trimmed to needed length | Video scaled up, cropping edges | Audio removed