hi welcome to the codehs AP Computer Science course in this video we're going to introduce you to Carol so first who or what is Carol well Carol is a dog who listens to your commands that's a photo of Carol and so programming or coding is really just giving commands to a computer which is a lot like giving commands to a dog so you might be wondering what do we do with this Carol and the idea is we can move around the world and put down and take tennis balls so this is Carol's World Carol's world
is a grid that Carol can move through where each dot is a location that Carol can be so you might be wondering what can Carol do specifically well Carol knows four commands Carol knows four words Carol can move turn left put down a ball and take a ball move move moves Carol one spot in the direction that Carol's facing turn left rotates Carol 90° to the left put ball adds One tennis ball in the current spot and take ball removes One tennis ball from the current spot so let's dissect a Carol command to see what
the parts are first notice that there are no spaces in commands second you need to match the exact capitalization so remember it's a lowercase M and every command ends in open PR parenthesis closed parenthesis semicolon and that way Carol can understand so the best way to dive in coding is by just doing it so we're about to write our first program where we have Carol starting in the world on the left in the bottom left corner Facing East we want to end up in the world on the right where we've moved two spots put down
a tennis ball and then move two more spots so let's switch to our code editor okay so this is our code editor in the center is where we'll write the code or the commands we give so let's first have Carol move and then move one more time so let's see what happens when we run this program so we run we see Carol moves two times okay we'll click reset to start it over so we'll move twice and we'll put down a ball and then we'll move we'll move again so let's run that to see what
happens so you can see Carol will actually move in the Grid on the right and the commands will highlight in the code on the left so we can change the speed here and see what happens if we speed it up here will go a little bit faster and that's it that's our first program after this you'll have a chance to write your own program