-
hi and welcome to code break my name is
-
Hadi and across zoom Facebook live and
-
YouTube live we have tens of thousands
-
of people joining us
-
so yeah they were hoping to build the
-
world's largest live interactive
-
classroom with so many students at home
-
my team at code.org invites families
-
everywhere to join us for a weekly dose
-
of inspiration community in computer
-
science I'm here with my daughter and
-
sidekick Sophia she's a budding computer
-
scientist and I'd like to introduce our
-
first special guests the amazing actress
-
and activist Yara Shahidi yeah hi how
-
are you and we're you calling us from
-
I'm good I'm calling from LA where I am
-
with my family quarantined and how are
-
you spending this time with everything
-
closed I mean it's been a mixture of
-
keeping busy while learning and then
-
lots of family activities one of my
-
brothers made a podcast in his free time
-
so it's really just been trying to stay
-
creative and you've been in school that
-
school just finished for you yes the
-
other day literally mmm 24 hours ago
-
very proud my last papers and when
-
you're you you're sitting in Harvard
-
where you're even yeah I'm a sophomore
-
so I'm now a rising junior awesome in
-
Yara's do many thoughts you want to
-
share with students who like you have
-
been studying at home and are probably
-
struggling with staying motivated in law
-
school no I know I know and understand
-
because not only am i doing it both of
-
my brothers who are in middle and high
-
school have been distance learning I
-
know it can be difficult I think the way
-
that I've done it is I've tried to
-
create my own goals for myself because
-
it's sometimes hard to stay motivated
-
with their goals so whether that I mean
-
something super simple I am a secretly a
-
grandmother so whether that's
-
knowing that I get to crochet when I
-
finish an assignment or get to go learn
-
a new skill then that's usually what
-
inspires me to get through whatever I
-
need to finish it well I'd like to
-
introduce another special guest fuzzy
-
Kawasaki fuzzy how are you hi I'm doing
-
great
-
how are you I'm great at fuzzy is the
-
inventor of Google Spreadsheets and
-
where are you calling us from I'm
-
calling from beautiful New Jersey
-
overlooking New York and probably the
-
question everybody wants to know what
-
kind of name is fuzzy what kind of name
-
is fuzzy it's a very it's a very popular
-
Persian name no it's a nickname my
-
soccer coach decided to call me fuzzy
-
and it's stuck and how will you serve me
-
well because everyone who meets me
-
thinks oh what a what a funny name and
-
it's a good conversation starter all
-
right well we're gonna start today's I
-
guess conversation with the computer
-
joke of the day and so he has I've got a
-
little sound machine that uses because
-
we have so we're kind of low production
-
here idea you wanted to tell fuzzy and
-
you are on your joke of the day okay
-
what did computers do just before going
-
to bed what did they do spreadsheets
-
Duke just for fuzzy thank you now let's
-
meet our live audience we're gonna
-
switch to gallery view so we can see the
-
names put on the faces of all the
-
students are joining us on camera can
-
everybody wave and say hello everybody
-
I'd like to also have us say hello to
-
the rest of our audience we can't see
-
the majority of our audience but I'm
-
gonna screen share as they were joining
-
this we give them a chance to put where
-
they're from
-
on a map so here's our map oh wow Yara
-
and fuzzy I don't know if you expected
-
to have people
-
from all over the world but time zones
-
very far away from here
-
yes great look that everyone's tuning in
-
yeah
-
a lot of you yeah it see there's people
-
as early as 6 a.m. 7 a.m. 1 a.m. really
-
from all time zones for joining in that
-
for this live classroom which has really
-
just been an incredible thing to see
-
happen during this pandemic so also just
-
you know these students are they range
-
from age 66 260 from all grades there
-
are also different levels of experience
-
some beginners some intermediate some
-
advanced if you're advanced please be
-
patient with us we're gonna start with
-
the easy stuff and if you're a beginner
-
please stick with us through the whole
-
classroom even if it goes too fast for
-
you hopefully you'll soak something out
-
also if you have questions during the
-
show for either of our special guests or
-
for me
-
you can visit code.org slash questions
-
to submit your questions today we have
-
three parts in our episode we're gonna
-
talk about variables today and we're
-
gonna learn about variables first in an
-
unplugged way then about using variables
-
in games and lastly about using
-
variables and apps valuables are one of
-
the most important things in computer
-
science but before we move on to today's
-
lesson we want to welcome some students
-
to demo their creations to our special
-
guests last week's challenge was to make
-
your own flow chart or to modify the
-
apps we made for you the magic 8-ball
-
app for the DECA stroller app and each
-
week when you share your creations we'll
-
invite you to show them the best ones on
-
next week's episode so Yara and fuzzy
-
you ready to meet our two students from
-
last week I'm so ready
-
alright so doc who's from India
-
submitted a dice roller project this
-
week doc we're gonna unmute you can you
-
tell us more about yes are you there
-
yeah we're from India hello hi their way
-
from India India let me screen share
-
your app and then you can tell us more
-
about it it's a very nice hat by the way
-
it's actually no there are two variables
-
first one is first variable the first
-
variable we put a straightforward
-
equivalent to random integer second one
-
there if there is variable which we put
-
equivalent to random number which which
-
it picks from 1 to 10 as as we click
-
dark then there is number come whether
-
it comes 1 then there is equal to 1 6
-
then it comes to then earlier we press
-
alia then it comes 5 so this number 6 is
-
more than 5 result Dutchman's so it's
-
like check not only we made a dice
-
rolling after you guys created this from
-
scratch again click then action alia and
-
shows who wins aliens then click again
-
click again click ducks again here
-
earlier and result here you go duck she
-
wins again there are two numbers equal
-
they are two numbers equal then mesh
-
right then
-
the ties I got it and it's all your data
-
disturb my sister all right very cool
-
the second app we have is from Abigail
-
unfortunately Abigail's audio isn't
-
working so she can't speak with us
-
Abigail's from Vermont and she took our
-
magic 8-ball app which was a very very
-
simple app and made something much more
-
complicated she made six different or
-
seven different six different games only
-
one Yara or fuzzy are there any of these
-
you want to try Yara go ahead I play
-
tic-tac-toe excellent I'm not not that
-
Jerry tic-tac-toe is the one she hasn't
-
finished yet
-
okay it's the only one I tried before it
-
doesn't work yes you are the truth or
-
dare yes
-
okay let's try two three all right Yara
-
do you want on truth or dare I'll do a
-
truth all right let's go Sofia you want
-
to click I'm nervous oh gosh
-
it happens okay just because you're
-
alive of 10,000 people you have a
-
question from Yara so there's another
-
one of these apps is the cursor maze
-
check this out Sofia has wanted to play
-
this all morning so this is a cursor
-
maze app where you need to control the
-
mouse to get from the start to finish
-
without touching any of the blocks so
-
she has to move the mouse very carefully
-
and it gets harder than easy yeah and
-
it's really simple after this I don't
-
know this is one out of six apps and
-
then you have to click next level right
-
this is fenomena Thank You Abigail for
-
sharing that app Thank You Abigail yeah
-
thank you
-
you want to play an applause sound for
-
both Abigail I'm - for their apps yes
-
sorry you were on mute alright so for
-
today our word of the day is variable a
-
variable is a way to store hold
-
information that can change you may be
-
familiar with variables from math class
-
like in that class when you say X equals
-
5 X is a variable and it holds the
-
number value 5 but variables and
-
programming are different in two key
-
ways first of all and programming and
-
computer science valuables can change so
-
X can start like a 5 but then it can
-
become a 6 or a 7 or an 8 it doesn't
-
stay the same the second thing is
-
valuables and computer science can
-
change can hold many different types of
-
values they can be numbers they can have
-
words or even more complicated
-
information now why would we use a
-
variable anytime a computer program
-
wants to keep track of anything because
-
it's the variables basically act like
-
its memory like to remember the score
-
and a theme or to remember the names of
-
the players or anytime you type
-
something in an app the app remembers it
-
in America now we're going to see
-
variables in action with health
-
Yara so we're gonna switch to gallery
-
view to see all the students on the
-
screen and I want every student on the
-
screen including fuzzy and Yara to all
-
the variables your basic variable and
-
each variable has a name so yeah we can
-
see your names on the screen so Yara
-
what's your name
-
it's Yara Yara so that's the name of
-
your variable so each file gets assigned
-
a value so I'd like you each to pick a
-
number between 1 and 10 and to hold up
-
your number up on the screen so we can
-
see all the numbers assigned to all the
-
different variables
-
alright so Yara what number are you
-
ships
-
storing seven you're seven so you could
-
say that Yara equals seven so now Jana
-
I'm gonna ask you to change your value
-
and so when I do you can like shimmy
-
your hands when you get a new okay
-
everybody else keep your numbers up and
-
I want to make a number that combines
-
the numbers in the variables Owen and
-
Evelyn so we're gonna highlight Owen
-
that's Owen Owen what number are you
-
showing that's a two and then Evelyn and
-
Evelyn I think is showing a three so
-
y'all I want to say Yara equals Owen
-
plus Evelyn oh so you're already a five
-
you changed from a seven to five so when
-
we say yarn ankles Owen Plus Evelyn you
-
set one variable to the value of two
-
other variables now Owen and Evelyn can
-
you both change your numbers pick a
-
number between one and five a different
-
number all right and Yara can you
-
reevaluate the are equal Owen Plus
-
Evelyn all right so you see now Owen is
-
a four and Evelyn is a 2 so Y became a
-
six now I want to ask Evelyn your number
-
changed did your name change no no and
-
that's that's right because with
-
variables the value of a variable can
-
keep changing a computer program can
-
change it all the time then
-
the variables stays the same all right
-
you can put your hands down we're gonna
-
do something totally different now we're
-
going to be variables in a different way
-
what we're going to do is show how
-
variables health computer programs
-
remember and to do this we're going to
-
have yara act like a computer program
-
for ordering a food basket okay
-
yara since you're an actress you're
-
gonna act like a computer who can't
-
remember anything without saving
-
information and we want a great role yet
-
mm-hm
-
we we wanted to act like you have no
-
memory without the help of your
-
variables and all the students you see
-
on screen are gonna be your variables
-
they can save information for you is
-
that sound okay that sounds great right
-
did you remember anything I just said no
-
actually you need to remember what I
-
said but once you're running the
-
computer program you should forget it
-
all great got it Sofia here is gonna
-
order a fruit basket from Yara and Yara
-
each time Sofia asks for new fruit to
-
add to the basket I want you to ask one
-
of the student variables on screen to
-
save that piece of information by
-
writing it down so you can say for
-
example Naomi please save an apple and
-
Naomi will write it down and while
-
you're doing this
-
Fuzzy's you're going to be a counter
-
variable I want you to start with the
-
number zero and then each time Sophia
-
asks for a new fruit add one to your
-
number so you'll show how much fruit
-
Sophie has asked for I've been packing
-
are you ready yeah all right Sophia go I
-
like apple please stam yo can you
-
remember an apple it's the same I was
-
going to write this down next I like an
-
orange Seth can you do me a favor and
-
remember orange and write it down Seth I
-
want a pear a new shot can you please
-
remember pear for me can I have a grape
-
please Naomi can you remember grapefruit
-
for me please I'd like a Kiwi - all
-
right Serena
-
will you write down QE for me and lastly
-
I would like a banana okay Amir can you
-
remember banana for me please all right
-
before we make this fruit basket how
-
much is this fruit order going to cost
-
let's say it's $2 per piece of fruit how
-
much should Sophia pay let's do a poll
-
from our audience all the folks on zoom'
-
were not on camera you can look at fuzzy
-
the counter and we are going to ask how
-
much does Sophia's fruit basket cost is
-
it $12 or is it two dollars per fruit or
-
is it two times fuzzy or is it all of
-
the above all of the above God said
-
don't tell us the answers people are
-
actually filling out the poll but all
-
right almost half the students have
-
already voted fuzzy sort of gave away
-
possibly gave away the answer might not
-
be right we'll see
-
all right let's share the poll results
-
of what students guessed
-
all right before it was almost a dead
-
heat but we have now 70% of you guessed
-
all of the above and that's correct so
-
the food basket is gonna cost $12
-
because it's $2 per fruits and Fuzzy's
-
been the food counter counting how many
-
think Sophia's ordered now Yara dear
-
remember Sophia's fruit order I don't
-
I'm not sure anybody remembers it but
-
since you're a computer program you
-
don't need to have your own memory your
-
variables save that for you so if you'd
-
like you can now ask your variables to
-
show their information up on the screen
-
so you can see it yes please well my
-
variables share what we've stored so can
-
all the variables hold up your pieces of
-
paper so Yara can see see an apple pear
-
grapefruit keep holding it up so y'all
-
can you now from what you see make the
-
fruit basket that that's Sophia ordered
-
thrust yes
-
I see an apple a pear a grapefruit okay
-
so I have some fruit with me I have my
-
apple have my kiwi I'm going to draw a
-
pear I have my grapefruit and I'm gonna
-
do a nice round pear for everybody
-
artist so yo can you now hand the bowl
-
of fruit to Sophia together we want to
-
test out a really new zoom feature
-
called zoom fruit delivery gladly
-
Sophia thank you everybody for the
-
variables for the healthy determined
-
helping our food delivery program
-
remember her fruit order so to recap
-
first we use variables to store numbers
-
and we showed how the values changed and
-
next we use variables to store text so
-
the computer er could remember how to
-
prepare a food order that we're gonna
-
explore more about it valuable soon but
-
first let's learn a little bit more
-
about God so Yara you're our third
-
special guest to play our lightning
-
round game we're gonna put 60 seconds on
-
the clock and Sophia's going to keep
-
score actually on an app she Scott is
-
gonna keep score and and your goal is to
-
get through as many questions as
-
possible and beat our current score of
-
nine nine questions which were answered
-
by Sal Khan so you want to make the
-
comments but also make it fast
-
I've got it all right Sophia go umm
-
country you have all you want to visit
-
but haven't Greece advocated what did
-
you want to be when you grew up a
-
historian favorite drink um my go-to
-
black tea my side ask something you
-
can't ever eat no matter how many people
-
love it sardines the last person you hug
-
know
-
living with you not living with me oh my
-
goodness
-
my friend Jacqueline 30 seconds your
-
favorite smell um I love just any
-
kitchen smell I love this smell of the
-
kitchen being used because it means that
-
we're about to eat
-
what were your hobbies when you were a
-
kid I loved everything from exploring
-
and I was in karate and I would rock
-
climb what was her score seven so that
-
was variable so close thank you so much
-
and we're gonna play a little applause
-
sound all right so I have a few more
-
questions for both fuzzy and yah for
-
each of you how did you become a
-
standout in your field and especially in
-
a field for both of you that has a lack
-
of diversity and representation you want
-
me to go well yeah go ahead fuzzy so I
-
don't think it was intentional when I
-
I've always thought that diversity was
-
very important and I'd like to I tried
-
to work in companies that were very
-
diverse I find that having working on
-
products that are user facing it's
-
really important to build stuff that a
-
lot of people can use so I try to
-
surround myself with a lot of diverse
-
people and that would be able to build
-
things that you know have have different
-
viewpoints one of the things that I
-
remember for example with sheets is
-
having someone on the team that was
-
basically hearing-impaired originally
-
impaired helped us empathize more and
-
build products that met the needs of
-
visually impaired more so diversity was
-
really important for us there and how
-
Hollywood doesn't have nearly as much
-
diversity as a lot of people who wish it
-
did yeah um well I'm grateful because I
-
got into this because I love to read I'm
-
sorry till I actually didn't watch much
-
television until I was 13 we'd watch an
-
hour
-
on Saturdays mouths about it so it's fun
-
for me to be a television actor who
-
didn't watch TV but it was because I
-
love telling stories and so a lot of
-
what I do is when I'd get a script or
-
have to go audition it was really about
-
what story are we telling and I think
-
similarly to fuzzy I found places in
-
which diversity was really valued so
-
whether that be on blackish or even now
-
I'm grown ish it was something where I
-
didn't even have to be a conversation
-
because everyone knew how important it
-
was not only for a great work
-
environment but just for a great final
-
product - and we've had the best time
-
and now we are in the role of making
-
television and that has been so much fun
-
because we get to bring to life stories
-
that I'm just discovering or learning
-
about and we're constantly meeting new
-
people who have incredible things to
-
share and why do you think it's
-
important to increase representation of
-
women or people of color and fields such
-
as technology it's always been really
-
important to me I had the privilege of
-
going to an all-girls school and I
-
remember what that did for me because I
-
at no point did I process like oh the
-
sciences weren't meant for me or stem
-
wasn't meant for me because I was
-
surrounded by people who proved that it
-
was but I think just to Fuzzy's point we
-
need diverse teams of people in order to
-
make products that reflect what our
-
world looks like and I think so much so
-
many people have so much to contribute
-
that it's important that we decrease the
-
barriers that just stop people from
-
being able to contribute study computer
-
science while you're at Harvard or high
-
school either does it's so funny that
-
you say that I'm about to sign up for a
-
class for my summer class I haven't
-
decided yet
-
I have friends so a lot of my actual all
-
my girlfriends I think I've taken a
-
computer science class and I'm beyond
-
I'm the odd person out right now so I'm
-
taking more suggestions I'm speaking of
-
diversity by the way one thing that's
-
unique is all of us right here Sophia
-
myself fuzzy and Y are all for Iranian
-
Americans the way nice t-shirt huh D
-
yeah I'm wearing an image
-
t-shirt because fuzzy and I are also
-
immigrants as well
-
Oh Thank You Evelyn for showing a heart
-
so yeah we have some questions from our
-
student panelists as well one of our
-
producers at Kyra is going to introduce
-
these students hi ara so we have two
-
questions one friend a ha who has a
-
question about girls and achievements
-
and they hum going to onion you what
-
suggestions do you have for girls to
-
stay confident in whatever field they
-
choose and to become leaders in their
-
community yeah hi I know that's a
-
wonderful question I think what I've
-
always relied on is I always say my
-
support network and so for me that's my
-
family I come from a really cool
-
matriarchy of women but that's also my
-
chosen family my friends my professors
-
and teachers and the reason I say that
-
is that there's so much happening in the
-
world that often times you can run into
-
barriers that try and convince you that
-
this is an ear space but that's why I
-
rely on the people around me not only
-
for that confidence boost but to
-
constantly get better at whatever I'm
-
trying to achieve but I think having
-
those people around me have helped me
-
through every step of the way
-
and to always be open to learning thank
-
you so much and we also have our last
-
question from Amir so Amir I'm going to
-
unmute you he had a question about
-
achievement yeah what drives you to
-
achieve your goals and motivates you to
-
never give up
-
that's a great question Amir and I've
-
been thinking about that a lot
-
especially now that we're all at home
-
and life looks very different right now
-
but I think what's been important for my
-
entire family are finding ways to
-
continue to be of service to my many
-
communities not only the communities
-
that my family are part of being black
-
in Iranian but just the many communities
-
that I think support us and so sometimes
-
that small like on blackish being able
-
to tell really great stories that
-
hopefully spread a point of view and
-
sometimes that's trying to figure out
-
how I can use an opportunity to give
-
back and how I can support other people
-
but that's always helped motivate me
-
because otherwise if you're not doing if
-
you're just doing it for yourself
-
sometimes it's hard to find the
-
motivation but when you do
-
for the betterment of so many people
-
around you then I think that's what
-
convinces me to get up when I'm not
-
trying to accomplish something to go to
-
go do it thank you you're on thanks Amir
-
yeah thank you thank you so much and
-
Yara thank you for joining us today to
-
share your story we're all a part of
-
Yara soon so can we switch to gallery
-
view for the audience so all of our
-
students can wave goodbye to Yara and so
-
if you can you play an applause thank
-
you thank you my first computer science
-
class thank you so much thank you
-
alright fuzzy let's chat a little bit
-
more though bye bye Yara so fuzzy we're
-
gonna chat a little bit more about your
-
background and your work at Google with
-
Google Spreadsheets while fuzzy and I
-
chats if you have questions don't forget
-
to send them in at code.org slash
-
questions you have about two minutes if
-
you want to submit a question so fuzzy
-
how old were you when you began learning
-
how to code and how did you get into it
-
what's your story about how you got into
-
this I don't even remember how old I was
-
because I was a as you can tell I'm I'm
-
not a young young young one like you all
-
so back then I was actually history
-
major in college and when I graduated I
-
didn't I was having a hard time finding
-
a job so I ended up selling life
-
insurance for a while then real estate
-
that my wife said wouldn't it be great
-
if we open up a Subway sandwich shop and
-
worked all day and all night together
-
and I said sure we tried that for a
-
while it wasn't only it wasn't until my
-
30s when I actually started really
-
coding I had a job in the banking
-
industry and was coding there and
-
teaching myself most of the coding and
-
that's when I came up with the idea of
-
taking sell spreadsheets and converting
-
him into Web Apps and the idea with the
-
help of a lot of amazing people we sold
-
that product to Google and it became
-
Google sheets so it wasn't like I wasn't
-
coding as a young kid like everyone here
-
that's really kind of what most people
-
envision that people
-
start companies and sell them you know
-
our whiz kids who learn when they're
-
like really young and then sell their
-
startup when they're like right out of
-
school or something but you'd between
-
being an insurance salesperson and real
-
estate sales persons the sandwich sales
-
person make great sandwiches to make
-
great sandwiches yeah it's pretty
-
amazing that Google Spreadsheets was
-
basically an acquisition by Google of a
-
company made by a sandwich style
-
sandwich shop owner and by the way if
-
you think about it there's a connection
-
between spreadsheets and our earlier
-
activity when we were all in a grid the
-
students were in a grid each one of us
-
was a variable just like a spreadsheet
-
stores a value in each of the cells in
-
its grid and each cell in a spreadsheet
-
has a name like a 1 or B 1 or C 2 just
-
like a variable and in fact I often tell
-
people if you've ever written a command
-
in a spreadsheet using a formula like
-
saying this cell is going to be the sum
-
of this and that you've written one line
-
of code and that's how you can start
-
learning computer programming so now
-
we're gonna go into the second sentence
-
of today's class which is learning about
-
how to use variables and games and so
-
fuzzy Sophie and I are gonna use we're
-
basically gonna use ku dog to modify a
-
game using validus and I'm gonna change
-
the screen share to just show code or
-
game screen just one second
-
all right can you see my screen yes I
-
can it's wonderful thank you so for
-
those of you who are not familiar we're
-
in co.org sprite lab on the left-hand
-
side is where the code will be running
-
where we make our game on the right hand
-
side is the code for this game and
-
there's all these little commands and
-
here in these different drawers that we
-
can look at now this code is already
-
been written and I'm not going to run
-
through how it works what it does is it
-
creates a bunch of these little players
-
called sprites on the screen so it's got
-
this little alien who's a good guy and
-
then these purple aliens are bad guys in
-
these coins and when you run up the Run
-
button all these things float around and
-
you can use the cursor keys to move the
-
good alien that we control you can also
-
use the cursor keys on a keyboard the
-
arrow keys move the good
-
the good little alien but what we wanted
-
to do is when they're good little alien
-
catches a coin we want to count the
-
score so Sophia you're gonna do that
-
using valuables and so we're up here and
-
it says when a coin has been gotten by
-
the good alien so what is the first
-
thing we want to do so if you go into
-
the sprites menu and the first thing you
-
want to do is remove the point so bring
-
out the remove block and then take out
-
or change that to the coin actually no
-
don't change that because that's gonna
-
remove all the coins take that out take
-
out this little block and go into the
-
sprite menu and choose this sprite
-
because if each removed the coins but
-
all of them would go but you want to
-
trim this just this right and now when
-
you do this
-
that's right that you get will disappear
-
but what we also want to do is increase
-
the score and at the start of the game
-
we created a valuable score we set the
-
score 2-0 so now what I want you do is
-
to go into the variables section and set
-
the score see it's a set score to
-
personally not set score to change score
-
change and then clear that I and change
-
it to score and so we're gonna change
-
the score by one you want to change it
-
by one or by two let's leave it by one
-
now that's good to stuck me when I was
-
the counter exactly that's just like
-
here now so if you hit the Run button as
-
you're going around you can control the
-
little you couldn't roll this little
-
thing and it's catching these little
-
coins and the coins are disappearing but
-
we're not seeing the score so what we
-
need to do is we actually need to
-
display the score on screen so so if
-
they go into this area of text the
-
section that says text and bring out the
-
print button and in there you want to
-
type score but we want to combine the
-
score the word score with the value in
-
score so go into texting
-
and bring out this join block and
-
dropped it in there and inside the print
-
instead of a little score block yeah and
-
then join the the word score with the
-
quotes around in the Kulin and then in
-
the variables bring out the value score
-
so now it's going to tell the story
-
which time we get one of these things so
-
now if we hit run I'm gonna play this
-
this time I can run around and catch the
-
coins and see I got a score of one no
-
score to the score of three and so on
-
now I want to use a different battle it
-
looks fuzzy fuzzy you can also count
-
these as well what I want to do next is
-
actually make it so that our player gets
-
smaller and smaller and the points get
-
smaller and a harder to catch as we go
-
along so what we need to do is go back
-
to the start of the game and create a
-
new variable we're going to create a new
-
variable for the size of these so go
-
into variables and say set I to and
-
click on the eye and say rename this
-
variable so we're going to change that
-
to size the bargaining is going to be
-
size all right and we're gonna set size
-
can you drag out the number zero and set
-
the size to 50 all right so this is
-
gonna be the counter for what our size
-
should start to ask but what we want to
-
do is now every time you capture a coin
-
you want to change this change all the
-
sprites to that size so now go into
-
actions actions and see where it says
-
set size 250 bring that out and so when
-
a coin is caught change this coin size
-
but instead of choosing 50 you pull out
-
that 50 and then go into very ease and
-
pull out the size value now size is
-
going to keep this size at 50 so before
-
we do that we actually want to reduce
-
the size as well so go into variables
-
again and save huge
-
change I by and assuming keep changing I
-
change the size so we want to make this
-
eyes smaller it started out as 50 if we
-
reduce it how much do we want to change
-
it by how about by negative negative 10
-
so it'll start us 50 then become 40 then
-
30 and so now we want to do this not
-
just for the points let's make
-
everything smaller so click this block
-
and hit command C to copy it and the
-
command V to paste it and I'll put that
-
in there so not only the coins change
-
sides make the good little alien change
-
size and then click that whole block
-
again and hit command C and command V
-
the dark side purple aliens right now
-
try they're doing again yeah you're
-
doing great
-
oh my God look how tiny you got you're
-
getting a score it's super hard to see
-
you anger is not as good as me it's so
-
these aliens are now size 10 so it's
-
hard to see them all right that was
-
super fun
-
so I'm gonna stop this for a second
-
mount like all things you make on code
-
over one thing we can do is we made this
-
little game and we can share it out and
-
if you want you can actually I'm gonna
-
make this a little bit bigger you can
-
actually scan what we this QR code using
-
your phones and the app that Sophia made
-
would then show up you just tap the
-
little thing that shows up on your
-
screen and that after we just made this
-
on your phone to play it so if you don't
-
play it right now
-
but instead of doing that right now
-
we're gonna send this app to you an
-
email later so you can actually improve
-
on it more in fact one of the things we
-
wanted to do is figure out what happens
-
when the good alien runs into the bad
-
purple aliens that's something you can
-
do now before we go into the next part
-
of our episode actually want to take a
-
pause and do our trivia questions so
-
it's trivia attack yourself
-
so fuzzy we want you to read the trivia
-
question for today's audience and
-
everybody of the frosted zum caulk and
-
answers make sure to read the question
-
and all the answers and should I answer
-
it like last time what was the first
-
computer that had real-world practical
-
use
-
was it the ENIAC the Turing machine the
-
baggage the Babbage calculator or a
-
human who did the job of a computer
-
let's see who's the who's ahead looks
-
like I'm watching the results come in
-
not everybody else can see them but we
-
have about half of our audience is
-
already voted I don't know I don't know
-
what the image of you voted and this is
-
a pretty tight one this is tight I don't
-
know this is tricky so almost everybody
-
has voted so can we share the results of
-
people's polls
-
Wow everyone thinks that more most
-
people think it was a human so I'll say
-
straight up the Turing machine isn't
-
actually a physical machine it's a
-
conceptual abstraction and the Babbage
-
calculator was really also theoretical
-
calculator Charles Babbage came up with
-
the idea of a computer but neither of
-
those are actually sort of real-world
-
practical uses I'm going to give you the
-
answer be a screen share so just one
-
second I'm going to share my screen
-
the ania computer built in 1945 80 some
-
80 years ago it was 800 square 1,800
-
square feet of office space it took and
-
it weighed 32 tons this was the first
-
modern anumana the first computer with
-
practical use and used vacuum tubes
-
instead of transistors and electricity's
-
and today's phones like Sofia's phone
-
right here have a tiny chip the size of
-
a fingernail that's literally a million
-
times more powerful than this first
-
computer however this wasn't the first
-
computer that had real-world practical
-
uses the first computer as early as 1613
-
a computer was somebody who did
-
shooting work like math work like math
-
calculations and throughout the 1800s
-
and even the 1900s entire teams of
-
computers often women would work on hard
-
problems because we didn't have the
-
machines yet to do this work and in fact
-
here's pictures of some of the women who
-
helped get the man on the moon it helps
-
America's space program these young
-
women were called computers that was
-
literally their job and if you've seen
-
the movie hidden figures at showcases a
-
woman named Katherine Goble who's one of
-
these women these women basically did
-
the work of now today's modern day
-
computers and I think that's interesting
-
because in today's world technology is
-
constantly improving in a way that
-
changes jobs and human jobs are being
-
replaced by machines and the computer
-
itself used to be a human job long
-
before we have what we what we now think
-
of as computers so we're now going to
-
move to the next segment in our episode
-
which is using variables and apps and
-
we're gonna say goodbye to Sofia
-
I see that and we're gonna welcome my
-
second sidekick and my son Darius hi all
-
right Darius ideas so what we're gonna
-
do is we're gonna make an app that helps
-
us invent a story it's gonna be a tell
-
me a story that is really nervous a
-
little bit a little bit nervous it's
-
always a little bit nervous to have a
-
big audience and it's especially nervous
-
when you're coding in front of the big
-
audience coding by yourself is a lot
-
easier because you can make mistakes and
-
then you can fix your mistakes making a
-
mistake in front of thousands of people
-
is definitely different so we're gonna
-
share screens here we're now in co.org
-
app lab and what you see here on the
-
left is the app we're gonna create on
-
the right is the code and we've started
-
some of this for you I'm gonna walk you
-
through this
-
we're in design mode you can see this
-
app has a bunch of text inputs where you
-
can enter a name an adjective a noun and
-
a verb and when you click this button
-
it's not doesn't do anything yet because
-
we haven't written the code for it but
-
we would like it to do
-
is to store all this information just
-
like yara asked the valuables to
-
remember the names of fruits we want the
-
this app to remember this information
-
and then to switch to screen two and to
-
fill in those different words to finish
-
this sentence to make a story so this
-
here is going to be the name and this
-
year is going to be an adjective and
-
this year it's going to be a noun and so
-
on so let's go to code mode and write
-
the code of what happens when you click
-
this button let's remember the
-
information here using variables fuzzy
-
will you be able to help us doing this
-
absolutely
-
alright so darius what i want you to do
-
is if you look here there's an on event
-
block is what happens when the story
-
button gets clicked and what we want to
-
do is get the text from these things i
-
store them in baggies and if you look up
-
top we already have created the values
-
for the main the adjective the mound etc
-
so what i want you to do is to go under
-
the values category of demands and drag
-
out the x equals but instead of x change
-
it to your name and you have a small
-
type of your name and so the value to
-
put a name go into your controls and you
-
want to get the value in the text editor
-
so use the get text block and you want
-
to do get text the main input alright so
-
what that's going to do is store that
-
into that valuable and then what we want
-
to do this is what's happening when the
-
tell me your story button is clicked so
-
what we want to do next is then it's
-
change the screen so go into the blocks
-
here know and and find this set screen
-
button it's near the very bottom right
-
there the set screen and pull that up
-
and now we're going to change screens at
-
screen too and just to remember what
-
screen to is over here you can click to
-
in design mode to change screen to so
-
that's what screen to its and i go back
-
to
-
right now once we change screen to
-
screen - we can set the text so this
-
text isn't the dispersed label up here
-
if you can move your mouse above this
-
these sort of question marks that's
-
where the name output is going to go so
-
go up and find the set text block it's
-
at the top you're doing great date and
-
set the text for name output right now
-
it's gonna fill it up with the word text
-
but we don't want to set the name output
-
to the text we want to use it about and
-
our variables let's see what should we
-
put over there for the variable yeah
-
this text here or the text I would say
-
funny no we want to change it to what we
-
stored in the variable so we're gonna
-
use your name which was the value that
-
we remembered oh I see alright so now
-
let's run this and see how it works it's
-
okay now hit run so now it's gonna say
-
let's come up with a story and so we're
-
gonna enter a name fuzzy pickles random
-
name for us random name
-
oh yeah pick darius darius that wasn't
-
very random
-
now click tell me a story and so you can
-
see it says one fine day darius walk
-
into a blank blank and blank over a
-
blank it was a truly great day so that's
-
our first step of remembering what
-
darius entered but we need to do the
-
rest of it so we're not going to do this
-
all typing in the code right now we've
-
actually written the lines to copy
-
seduce click show text when you click
-
show text you see all this code of
-
JavaScript instead of blocks and if you
-
go to the very bottom you see where it
-
has all these adjectives already made
-
the adjectives and nouns and all these
-
get text blocks can you select all of
-
that and then cut it this looks like
-
really hard it looks like what my code
-
yes paste it there and then go down to
-
the bottom again and then all these set
-
texts
-
put it again so fuzzy yeah this what
-
we're doing right now is no longer like
-
dragging and dropping blocks it's
-
dragging it's literally and how real
-
coders work in new texts but one thing
-
you can notify Z is even though we're
-
we're here you can still drag and drop
-
blocks into here Wow
-
turns out to flex that's kind of neat
-
and then once we're done we can change
-
the back to block mode and everything we
-
copied and pasted is back into blocks
-
and so now and I'm going to close this
-
so you can see it more easily so what we
-
did now is when the story button is
-
clicked we collect just like Yara asked
-
Samuel to remember a banana and so in
-
soda a number of here we're going to
-
change these variables your name is
-
going to remember what's in the main
-
input and a man and what's the name of
-
this spiral each of these virals
-
remembers each of these things here so
-
when we change the screen when we change
-
the screen in each of these labels we
-
can set text and we get the values in
-
the baggages Siderius can you run this
-
and now we're going to try it out
-
so let's now come up with this dinner so
-
why don't you now come up with a name
-
pick a random one like me you wanna do
-
fuzzy okay
-
all right for the adjective fuzzy you
-
want to pick a good adjective give us a
-
fun yeah I'll go with funny like I was
-
putting before funny yeah
-
which rhymes with fuzzy it rhymes with
-
fuzzy and then for the third so for the
-
third for the second adjective well
-
let's do an audience poll so great
-
blanket poll so the entire audience can
-
choose the adjective we use so we can
-
choose funny braid famous or clumsy I
-
kind of bet I know what people are gonna
-
choose yeah we were paying this we were
-
pretty much certain what everybody is
-
gonna think is their favor
-
all right almost all of you have voted
-
all right so can we share the results
-
all right the most popular adjective is
-
clumsy so Darius can you type the clumsy
-
so steamed funny clumsy now bears can
-
you pick another now the grocery store
-
grocery store actually no I don't want
-
to type all right and then fuzzy you
-
want to pick another now yeah how about
-
a puppy happy and then last let's use an
-
audience choose a verb that ends in D so
-
can we put up the audience poll so
-
appeared sneezed jumped or danced and
-
let's let the audience choose what they
-
want all right
-
and can we share the results of the
-
audience votes all right the winning
-
answer is sneezed so Daris can enter
-
sneezed and then tell me a story so one
-
fine day buzz if you want to read it for
-
us sure but I'm gonna get all emotional
-
this is a story my mom used to read to
-
me when I was a baby
-
one fine day Steve walked into a funny
-
arcade and sneezed over a clumsy puppy
-
it was truly a great day I remember it
-
like yesterday when she used to read
-
this to me that's a wonderful story and
-
by the way fuzzy I have inside
-
information that your mom is actually
-
watching this today so Wow so she'll
-
confirm this confirm this so thank you
-
so much fuzzy for helping us with this
-
app and what we're gonna do by the way
-
is you're gonna get an email with this
-
app so you can improve on it yourself so
-
you can make multiple stories there's
-
multiple changes you can make to it so
-
for example you can take out this very
-
last line and replace it with another
-
variable you can make a second story
-
that uses the same inputs and you can
-
let their user to click between the two
-
story
-
you can make a longer story you gonna
-
have this app I'm not gonna use the QR
-
code to share it we'll send it to via
-
email I want to then also get some
-
chance for the audience questions that
-
people submitted for fuzzy so Akira
-
our producer is gonna join up again and
-
then share the questions for fuzzy at
-
this point I am an expert question asker
-
overlayer I'd like to think so fuzzy
-
this one is from Caitlin sea in Wyoming
-
she said what's at max have you had in
-
your career and how did you overcome
-
them what setback that's a great
-
question
-
setbacks I wouldn't say it's setbacks
-
because I always learn from every single
-
experience that I have and it's been
-
literally just you know making sure that
-
I've learned over time that I do much
-
better when I really enjoy what I work
-
on and I've learned that like trying
-
different experiences and if it's not
-
working out going to the next one but
-
using the last one as a learning
-
experience is really important so when I
-
was selling life insurance realizing
-
that I didn't necessarily I wasn't as
-
good at selling but I still expand I
-
learned a lot from it and then I moved
-
on to the next thing so you're always
-
just learning and trying new things and
-
you just can't give up thank you so much
-
buzzy and this next question is for both
-
you Hadi and fuzzy this is from Alice in
-
Zambia she said universities are
-
expensive so how can I learn computer
-
science without a university education
-
so judging by the question I'm assuming
-
she's a bit further along and so if you
-
both could speak to how can she learn
-
the basics and also how can she continue
-
to grow as she reached reaches those
-
more advanced stages how do you want to
-
take this or I can take it I can take it
-
all though Fuzzy's a perfect example of
-
somebody who's had an incredible career
-
creating and creating google
-
spreadsheets and even Google Docs and
-
Google Drive there's being used by over
-
a billion users and he never went to a
-
university to learn computer science he
-
basically taught himself coding and so
-
there's lots and lots of people that
-
teach yourself I also taught myself when
-
I was much younger living in Iran
-
but when I tell myself it wasn't nearly
-
as easy you needed to use books and
-
learning computer programming as part
-
today if you use code org as a beginner
-
you can learn all the stuff that we were
-
showing you you can use code or to
-
basically learn from our lessons that
-
guide you through them and you can also
-
get full computer science university
-
level computer science classes online as
-
well and in fact if you visit code.org
-
we link to some of the best university
-
computer science classes such as cs50 at
-
Harvard which I suspect is their class a
-
Jana she D is going to take when one of
-
either whether junior year senior year
-
starts and it's a year-long computer
-
science class that you could pay tens of
-
thousands of dollars to go to Harvard to
-
take that class or you can take it
-
online besides that there's many other
-
online university classes that you can
-
see links to from the code.org websites
-
and if you sign up on co.org slash break
-
for a mailing list you'll actually will
-
link that in our weekly email after this
-
episode oh wow just to expand on that
-
the best way to learn is to have a
-
project in mind so I love the fact that
-
when you go on code or you're actually
-
building something and learning it's
-
much better than reading a book whenever
-
I've done I've learned I in the past I
-
would get all sorts of books and then I
-
would try to use it to build something
-
exactly and we're so lucky we've had
-
students now have created 80 million
-
projects on code.org in just the last
-
two years so you won't be alone so we're
-
reaching the end of our time whether the
-
fun doesn't stop here we're gonna send
-
you all an email within the next hour
-
with all of our weekly challenges if
-
you're not on our email list go to code
-
org slash break and sign up and for this
-
week's challenges you're first gonna get
-
some practice you're gonna practice
-
variables to make a little bee that goes
-
and fetches honey and for our older
-
students there's some variable puzzles
-
that you can do an app lab and then for
-
this week's challenge you can either
-
modify the alien coin game that Sophia
-
made or if you can add features to a
-
storyteller app that there is made or do
-
both of those and when you finish share
-
with your parents if you have social
-
media you can ask them to share the app
-
on social media with hashtag go break or
-
you can email it to us and
-
that will pick two of the best ones that
-
you submit to highlight them and invite
-
them on our show next week and for
-
parents our activities each week include
-
activities that students can do on a
-
mobile phone if you don't have a
-
computer or even an unplugged activity
-
for students who don't have even a
-
device of any sort so please sign up for
-
our mailing list at code.org slash break
-
and lastly before we say goodbye I want
-
to share next week's special guests
-
which I'm very excited about we have two
-
special guests next week
-
one is Macklemore the famous rapper and
-
the second is Scott Forstall the
-
inventor of iOS and the iPhone so that's
-
going to be a really special episode and
-
not one to miss as we part I want to say
-
goodbye to our special guest fuzzy so
-
can we all switch to gallery view and
-
I'm going to play a quick round of
-
applause for fuzzy since so yeah it's
-
not here for us and all right everybody
-
good bye I by Darius great job thank you
-
and if you enjoyed today's episode
-
please spread the word if each of you
-
invites other pounds we're gonna to
-
gather make this largest interactive
-
classroom
-
thank you all goodbye see you next week
-
and if you're alone take a code break
-
you
-
you
-
you
-
[Music]
-
[Music]
-
[Music]