WEBVTT

00:00:00.050 --> 00:00:03.540
hi in this video we'll be going through

00:00:03.540 --> 00:00:07.470
an introduction to carol so who or what

00:00:07.470 --> 00:00:08.849
is Carol

00:00:08.849 --> 00:00:11.790
well Carol is a dog who listens to your

00:00:11.790 --> 00:00:14.000
commands and this is a picture of Carol

00:00:14.000 --> 00:00:17.430
so programming or coding it's really

00:00:17.430 --> 00:00:19.650
just giving commands to a computer to

00:00:19.650 --> 00:00:21.390
tell it what we want it to do and this

00:00:21.390 --> 00:00:24.240
is just like giving commands to a dog so

00:00:24.240 --> 00:00:25.560
in this unit we'll be spending a lot of

00:00:25.560 --> 00:00:27.449
time with Carol giving carol commands

00:00:27.449 --> 00:00:29.550
and teaching carol new commands to learn

00:00:29.550 --> 00:00:32.780
the fundamentals of computer programming

00:00:32.780 --> 00:00:36.989
what exactly can we do with Carol well

00:00:36.989 --> 00:00:39.629
we can move Carol around Carol's world

00:00:39.629 --> 00:00:44.100
and put down and pick up tennis balls so

00:00:44.100 --> 00:00:45.930
this is Carol's world it's a grid world

00:00:45.930 --> 00:00:48.469
with walls along the entire edge and

00:00:48.469 --> 00:00:51.449
each dot in the grid world represents a

00:00:51.449 --> 00:00:55.500
space that Carol can stand on but what

00:00:55.500 --> 00:00:59.340
specifically can Carol do well Carol

00:00:59.340 --> 00:01:01.620
knows for commands Carol knows how to

00:01:01.620 --> 00:01:03.420
move turn left

00:01:03.420 --> 00:01:05.489
put down a tennis ball and take a tennis

00:01:05.489 --> 00:01:08.820
ball so the Move command moves Carol one

00:01:08.820 --> 00:01:10.530
space in the direction that carol is

00:01:10.530 --> 00:01:13.920
facing the turn left command turns Carol

00:01:13.920 --> 00:01:16.890
90 degrees to the left put ball puts

00:01:16.890 --> 00:01:18.600
down one tennis ball on the space that

00:01:18.600 --> 00:01:21.000
Carol is standing on and take ball picks

00:01:21.000 --> 00:01:22.590
up one tennis ball from the space that

00:01:22.590 --> 00:01:26.189
Carol is standing on now let's dissect a

00:01:26.189 --> 00:01:28.110
Carol command and see what all the parts

00:01:28.110 --> 00:01:30.200
are so that we can give Carol commands

00:01:30.200 --> 00:01:33.329
so first it has to be one of these four

00:01:33.329 --> 00:01:36.540
commands that Carol knows second we

00:01:36.540 --> 00:01:38.490
notice that there are no spaces in the

00:01:38.490 --> 00:01:40.409
commands and we need to match the

00:01:40.409 --> 00:01:42.750
capitalization exactly so that Carol can

00:01:42.750 --> 00:01:45.409
understand so move is lowercase and

00:01:45.409 --> 00:01:48.540
every command ends with open parenthesis

00:01:48.540 --> 00:01:51.240
close parenthesis semicolon and when

00:01:51.240 --> 00:01:53.009
we're giving commands to a computer we

00:01:53.009 --> 00:01:54.899
have to give commands in a language that

00:01:54.899 --> 00:01:56.490
the computer understands and we have to

00:01:56.490 --> 00:01:57.630
type it in a way that the computer

00:01:57.630 --> 00:01:59.159
understands so that's what's going on

00:01:59.159 --> 00:02:00.810
with Carol Carol only knows four

00:02:00.810 --> 00:02:02.250
commands and we have to type these

00:02:02.250 --> 00:02:04.079
commands precisely so that Carol can

00:02:04.079 --> 00:02:06.570
understand them so the best way to learn

00:02:06.570 --> 00:02:08.160
how to program with Carol is to just

00:02:08.160 --> 00:02:09.660
dive in and do it so here we'll be

00:02:09.660 --> 00:02:11.740
writing our first carol program

00:02:11.740 --> 00:02:13.600
that has Carol's start in the world on

00:02:13.600 --> 00:02:15.220
the left with Carol in the bottom left

00:02:15.220 --> 00:02:17.920
corner facing east and end in the world

00:02:17.920 --> 00:02:19.660
on the right where Carol moves forward

00:02:19.660 --> 00:02:21.640
two spaces puts down a tennis ball and

00:02:21.640 --> 00:02:24.010
then moves forward two more spaces so

00:02:24.010 --> 00:02:25.990
let's dive in and write this program so

00:02:25.990 --> 00:02:28.420
here we are in the code editor and this

00:02:28.420 --> 00:02:30.070
is where we will be writing our programs

00:02:30.070 --> 00:02:32.440
throughout the course now there's a lot

00:02:32.440 --> 00:02:33.940
of really cool features and tools in

00:02:33.940 --> 00:02:35.440
this editor that we'll learn about as we

00:02:35.440 --> 00:02:37.090
go through the course right now we'll

00:02:37.090 --> 00:02:40.480
just go over our first program so this

00:02:40.480 --> 00:02:42.310
is the area that we build our program

00:02:42.310 --> 00:02:44.410
and the way we build our program is by

00:02:44.410 --> 00:02:46.960
putting together the proper blocks so

00:02:46.960 --> 00:02:48.820
over here is the block area and we're

00:02:48.820 --> 00:02:51.690
able to drag blocks from the block area

00:02:51.690 --> 00:02:55.240
into the actual program so I'll drag out

00:02:55.240 --> 00:02:57.430
the move command from the blocks into

00:02:57.430 --> 00:02:59.560
the code area and if I drop it it'll

00:02:59.560 --> 00:03:01.990
snap right into place so this is where

00:03:01.990 --> 00:03:04.600
we build the program over here is where

00:03:04.600 --> 00:03:06.490
we can actually run our program and see

00:03:06.490 --> 00:03:08.740
the result of our code so I've written

00:03:08.740 --> 00:03:10.300
one move command let's see what happens

00:03:10.300 --> 00:03:13.600
when we click run so Carol moved one

00:03:13.600 --> 00:03:16.780
space go ahead and reset it and if you

00:03:16.780 --> 00:03:18.700
ever need a reminder for what the goal

00:03:18.700 --> 00:03:20.560
of the program is all you have to do is

00:03:20.560 --> 00:03:22.450
go over to this exercise tab right here

00:03:22.450 --> 00:03:24.280
so here's the run code tab we'll go over

00:03:24.280 --> 00:03:26.590
to exercise and see okay this is our

00:03:26.590 --> 00:03:29.290
goal this is what we want Carol to do so

00:03:29.290 --> 00:03:30.970
this is our goal we want Carol to move

00:03:30.970 --> 00:03:32.860
twice put down a tennis ball and then

00:03:32.860 --> 00:03:34.420
move two more times let's go ahead and

00:03:34.420 --> 00:03:36.660
write that program back to the run code

00:03:36.660 --> 00:03:39.220
so I pulled out one move command let's

00:03:39.220 --> 00:03:41.970
pull out one more and put a ball down

00:03:41.970 --> 00:03:44.500
and notice there's a lot more blocks we

00:03:44.500 --> 00:03:46.000
can play around with in these sections

00:03:46.000 --> 00:03:47.620
but for now we've only talked about

00:03:47.620 --> 00:03:49.060
commands so we're gonna stick with with

00:03:49.060 --> 00:03:51.280
this section right here in commands so

00:03:51.280 --> 00:03:53.350
we have Carol move move and put a ball

00:03:53.350 --> 00:03:55.110
let's let's see what that looks like

00:03:55.110 --> 00:03:59.230
move move put a ball awesome if we want

00:03:59.230 --> 00:04:01.270
the code to go slower we can actually

00:04:01.270 --> 00:04:03.040
move this slider and that curl is going

00:04:03.040 --> 00:04:04.990
to move a little bit slower move move

00:04:04.990 --> 00:04:07.300
football and we make Carol really fast

00:04:07.300 --> 00:04:11.080
you great now what's cool is if you

00:04:11.080 --> 00:04:12.400
don't want to use blocks you can

00:04:12.400 --> 00:04:13.930
actually switch to the code view right

00:04:13.930 --> 00:04:15.370
here by clicking this to this button or

00:04:15.370 --> 00:04:17.380
switch to code view and now we're

00:04:17.380 --> 00:04:20.979
actually typing so you have we've had

00:04:20.979 --> 00:04:22.660
Carol move twice and put a ball now

00:04:22.660 --> 00:04:23.890
would you need Carol to move two more

00:04:23.890 --> 00:04:24.669
times

00:04:24.669 --> 00:04:26.319
so let's move one more time move one

00:04:26.319 --> 00:04:28.539
more time let's see what that does

00:04:28.539 --> 00:04:31.030
what's cool is in the code view when we

00:04:31.030 --> 00:04:32.680
run it we can actually see each line

00:04:32.680 --> 00:04:35.409
highlight as it runs so there we go we

00:04:35.409 --> 00:04:38.409
got it Kiril moves moves puts down a

00:04:38.409 --> 00:04:41.770
ball moves and moves great now it's your

00:04:41.770 --> 00:04:44.340
turn to give it a try
