The following is a valid Karel command?
move()
What is False.
What will the following code make Karel do?
turnLeft();
turnLeft();
turnLeft();
What is Turn Right?
Docs
The following is not a valid Karel command?
turnLeft();
What will the following code make Karel do?
turnLeft();
turnLeft();
turnLeft();
turnLeft();
What is spin?
Write the code for a single line of comments.
What is //
What's Wrong with the following method?
public karelDance()
[
move();
turnLeft();
]
The Brackets should be { }
A variable is something that the computer creates?
What is False?
Where will Karel land?
while(frontIsClear())
{ move();
}
Write the code used for multiple lines of comments.
/*
*
*
*/
If you need Karel to pick up a random number of tennis balls, would you use a For loop or While loop?
While loop
The name of the Class is called run().
public class FunKarel extends Karel
{
public void run()
{
move();
}
}
False
What will happen to Karel?
while(noBallsPresent())
{ turnLeft();
}
She will keep spinning.
How many times will Karel move?
for(int i = 1; i < 7; i++)
{ move();
}
6 times
What do you need to create to teach Karel a new command?
What is a Method?
run() is the name of the method that starts a Karel Java program?
What is True?
If you want Karel to put down 300 balls, would you use a For loop or While loop?
For loop
How many times will Karel move?
for(int i = 0; i < 7; i++)
{ move();
}
7 times
A set of instructions written in English or Pseudo code.
What is an Algorithm?