Introduction to Programming with KAREL / CodeHS
Answers
Who/What is Karel? .....ANSWER.....Karel is a dog who listens to
your commands
What do you do with Karel? .....ANSWER.....You move Karel
around the world and put down tennis balls
Karel Commands .....ANSWER.....move();
turnLeft();
putBall();
takeBall();
Commands have .....ANSWER.....No spaces
Exact capitalization
(); at end
Rows in Karel's world are called .....ANSWER.....Streets
,Page 2 of 22
Columns in karel's world are called .....ANSWER.....Avenues
If Karel is facing North and the code
turnLeft();
turnLeft();
What is a function? .....ANSWER.....A function is a way to teach
Karel a new word
Writing turnRight .....ANSWER.....functiuon turnRight(){
turnLeft();
turnLeft();
turnLeft();
}
, Page 3 of 22
Why use functions? .....ANSWER.....Functions allow us to break
down our program into smaller parts, and make the program
easier to understand
Defining a function .....ANSWER.....Specifying the instructions for
a new action
Calling a function .....ANSWER.....Causing the action to actually
happen
Defining turnAround() .....ANSWER.....functiuon turnAround(){
turnLeft();
turnLeft();
}
Calling turnAround() .....ANSWER.....turnAround();
Start function .....ANSWER.....This is the function that is called
when you click run.
function start() .....ANSWER.....functiuon start(){