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 cod
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(); } } 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()) { putBall(); move(); } } function north(){ while (notFacingNorth()) { turnLeft(); } } 1.13.4: Random Hurdles function start(){ for (var i = 0; i < 13; i++) { if (frontIsClear()) { move(); } else { jumpHurdle(); } } } function jumpHurdle(){ turnLeft(); move(); turnRight(); move(); turnRight(); move(); turnLeft(); } 1.15.4: Diagonal function start(){ while(frontIsClear()){ putBall(); move(); turnLeft(); move(); for(var i = 0; i < 3; i++){ turnLeft(); } } putBall(); } 1.15.5: Staircase function start(){ putBall(); while(frontIsClear()){
Written for
- Institution
- 1.9.5: Take \'em All 1.9.6: Dizzy Karel 1.9.7: For
- Course
- 1.9.5: Take \'em All 1.9.6: Dizzy Karel 1.9.7: For
Document information
- Uploaded on
- November 17, 2023
- Number of pages
- 8
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
195 take em all 196 dizzy karel 197 for