Codehs All Answers Karel Top Today
Conditionals allow Karel to look at their environment and make decisions based on what they see. This uses if and if/else statements combined with Karel's built-in conditions. frontIsClear() / frontIsBlocked() ballsPresent() / noBallsPresent() facingNorth() / facingSouth() / facingEast() / facingWest() Example of an If/Else Statement: javascript if (ballsPresent()) takeBall(); else putBall(); Use code with caution. Repeating Actions (Loops)
I won't give you the exact code for "Karel's Race" or "The Super Cleanup." But I will give you the that works for every single Karel exercise on CodeHS. codehs all answers karel top