diff --git a/Exam/index.html b/Exam/index.html new file mode 100644 index 0000000..d1f9838 --- /dev/null +++ b/Exam/index.html @@ -0,0 +1,849 @@ + + + + + Karel Simulator + + + +

Karel Simulator

+ + +
+
+

+ Write your Karel program below. Parentheses & semicolons mandatory. + If you’re ever unsure how to use the Simulator, + + consult the manual + . +

+ + + + +

Console Output:

+
+

Upload Map File:

+ + +
+ +
+

Karel Map:

+
+
+
+
+ + + + + + + diff --git a/Exam/manual.html b/Exam/manual.html new file mode 100644 index 0000000..ae50aef --- /dev/null +++ b/Exam/manual.html @@ -0,0 +1,106 @@ + + + + + Karel Simulator — User Manual + + + +

Karel the Robot – Quick-Start User Guide

+ +

1. What Is Karel?

+

+ Karel lives in a 2-D grid (“world”) of square cells. + He can face North/East/South/West, move one cell at a time, + pick up or put down “beepers,” and detect walls. +

+ +

2. Simulator Interface

+ + +

3. Syntax Essentials

+ + +

4. Built-in Commands

+

Movement

+ + + + +
CommandEffect
move()Step forward if no wall ahead.
turnLeft()Rotate 90° counter-clockwise.
+ +

Beeper Handling

+ + + + +
CommandEffect
pickBeeper()Pick one beeper from current cell.
putBeeper()Place one beeper into current cell.
+ +

Sensors & Conditions

+ + + + + + + + + + + + + + +
ConditionTrue When…
frontIsClear()No wall immediately in front.
frontIsBlocked()Wall immediately in front.
leftIsClear()No wall on Karel’s left.
leftIsBlocked()Wall on Karel’s left.
rightIsClear()No wall on Karel’s right.
rightIsBlocked()Wall on Karel’s right.
nextToABeeper()One or more beepers in this cell.
notNextToABeeper()No beepers in this cell.
facingNorth(), facingEast(), …Karel’s orientation matches the named direction.
anyBeepersInBeeperBag()Bag contains ≥ 1 beeper.
noBeepersInBeeperBag()Bag is empty.
+ +

5. Example

+
while ( notNextToABeeper() ) {
+  move();
+}
+pickBeeper();
+turnLeft();
+move();
+putBeeper();
+ +

6. Tips

+ + +

← Back to Simulator

+ +