Question 1: What are the horizontal pathways called in a Karel world?
Answer: rows
Question 2: What are the vertical pathways called in a Karel world?
Answer: columns
Question 3: If Karel starts facing East in the first row, third column, what row and column will Karel be on after this code runs?
move();
move();
move();
turnLeft();
move();
- Karel starts at Row 1, Column 3 facing East.
- After the first
move()
, Karel goes to Row 1, Column 4. - After the second
move()
, Karel goes to Row 1, Column 5. - After the third
move()
, Karel goes to Row 1, Column 6. - Then,
turnLeft();
: Karel is now facing North. - The last
move();
takes Karel from Row 1, Column 6 to Row 2, Column 6.
Answer: Row 2 and Column 6
Question 4: If Karel is facing North and the code
turnLeft();
turnLeft();
runs; which direction is Karel facing now?
- The first
turnLeft();
changes Karel's direction from North to West. - The second
turnLeft();
changes Karel's direction from West to South.
Answer: South