1.9.5: Take 'em All 1.9.6: Dizzy Karel 1.9.7: For Loop Square 1.9.8: Lots of Hurdle 1.10.5: Is There a Ball? 1.11.5: Right Side Up 1.12.4: Follow
The Yellow Ball Road 1.12.5: Lay Row of Tennis
Balls 1.12.6: Big Tower 1.13.4: Random Hurdles and more codehs
1.9.5: Take 'em All
function start(){ // Write your code here move(); for(var i = 0; i < 100; i++){ takeBall(); } move(); }
1.9.6: Dizzy Karel
function start(){ for(var i = 0; i < 32; i++){ turnLeft(); } }
1.9.7: For Loop Square
function start(){ for(var i = 0; i < 4; i++){ move(); turnLeft(); putBall(); } }
1.9.8: Lots of Hurdles
function start(){ for(var i = 0; i < 5; i++){ move(); move(); turnLeft(); move(); turnRight(); move(); turnRight(); jumpHurdle(); turnLeft();
} 1 / 2
} function jumpHurdle(){ move(); }
1.10.5: Is There a Ball?
function start(){ safePutBall(); move(); } function safePutBall(){ if(noBallsPresent()){ putBall(); } }
1.11.5: Right Side Up
function start(){ if (facingSouth()) { turnLeft(); } if (facingWest()) { turnAround(); } }
1.12.4: Follow The Yellow Ball Road
function start() { while(ballsPresent()){ move(); } }
1.12.5: Lay Row of Tennis Balls
function start(){ while(frontIsClear()){ putBall(); move(); } putBall(); }
1.12.6: Big Tower
function start(){ north(); clear(); putBall(); } function clear(){ while (frontIsClear()) {
- / 2