hi in this video we'll be going through
an introduction to carol so who or what
is Carol
well Carol is a dog who listens to your
commands and this is a picture of Carol
so programming or coding it's really
just giving commands to a computer to
tell it what we want it to do and this
is just like giving commands to a dog so
in this unit we'll be spending a lot of
time with Carol giving carol commands
and teaching carol new commands to learn
the fundamentals of computer programming
what exactly can we do with Carol well
we can move Carol around Carol's world
and put down and pick up tennis balls so
this is Carol's world it's a grid world
with walls along the entire edge and
each dot in the grid world represents a
space that Carol can stand on but what
specifically can Carol do well Carol
knows for commands Carol knows how to
move turn left
put down a tennis ball and take a tennis
ball so the Move command moves Carol one
space in the direction that carol is
facing the turn left command turns Carol
90 degrees to the left put ball puts
down one tennis ball on the space that
Carol is standing on and take ball picks
up one tennis ball from the space that
Carol is standing on now let's dissect a
Carol command and see what all the parts
are so that we can give Carol commands
so first it has to be one of these four
commands that Carol knows second we
notice that there are no spaces in the
commands and we need to match the
capitalization exactly so that Carol can
understand so move is lowercase and
every command ends with open parenthesis
close parenthesis semicolon and when
we're giving commands to a computer we
have to give commands in a language that
the computer understands and we have to
type it in a way that the computer
understands so that's what's going on
with Carol Carol only knows four
commands and we have to type these
commands precisely so that Carol can
understand them so the best way to learn
how to program with Carol is to just
dive in and do it so here we'll be
writing our first carol program
that has Carol's start in the world on
the left with Carol in the bottom left
corner facing east and end in the world
on the right where Carol moves forward
two spaces puts down a tennis ball and
then moves forward two more spaces so
let's dive in and write this program so
here we are in the code editor and this
is where we will be writing our programs
throughout the course now there's a lot
of really cool features and tools in
this editor that we'll learn about as we
go through the course right now we'll
just go over our first program so this
is the area that we build our program
and the way we build our program is by
putting together the proper blocks so
over here is the block area and we're
able to drag blocks from the block area
into the actual program so I'll drag out
the move command from the blocks into
the code area and if I drop it it'll
snap right into place so this is where
we build the program over here is where
we can actually run our program and see
the result of our code so I've written
one move command let's see what happens
when we click run so Carol moved one
space go ahead and reset it and if you
ever need a reminder for what the goal
of the program is all you have to do is
go over to this exercise tab right here
so here's the run code tab we'll go over
to exercise and see okay this is our
goal this is what we want Carol to do so
this is our goal we want Carol to move
twice put down a tennis ball and then
move two more times let's go ahead and
write that program back to the run code
so I pulled out one move command let's
pull out one more and put a ball down
and notice there's a lot more blocks we
can play around with in these sections
but for now we've only talked about
commands so we're gonna stick with with
this section right here in commands so
we have Carol move move and put a ball
let's let's see what that looks like
move move put a ball awesome if we want
the code to go slower we can actually
move this slider and that curl is going
to move a little bit slower move move
football and we make Carol really fast
you great now what's cool is if you
don't want to use blocks you can
actually switch to the code view right
here by clicking this to this button or
switch to code view and now we're
actually typing so you have we've had
Carol move twice and put a ball now
would you need Carol to move two more
times
so let's move one more time move one
more time let's see what that does
what's cool is in the code view when we
run it we can actually see each line
highlight as it runs so there we go we
got it Kiril moves moves puts down a
ball moves and moves great now it's your
turn to give it a try