subject

Super Cleanup Karel CodeHS. I have the code down which works for two of the five worlds. I can't figure out how to get Karel back to the first Avenue facing East without running into a wall or loop. I have tried looking it up this is my last resort to find the rest of the code. function start(){
ballsTaken();
while(leftIsClear()){
endUpFacingEast();
ballsTaken();
if(rightIsClear()){
endUpFacingWest();
ballsTaken();
}else{
turnAround();
}
}
}
function ballsTaken(){
if(ballsPresent()){
takeBall();
}
while(frontIsClear()){
move();
if(ballsPresent()){
takeBall();
}
}
}
function endUpFacingEast(){
turnLeft();
move();
turnLeft();
}
function endUpFacingWest(){
turnRight();
move();
turnRight();
}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 19:40
Write the quartstogallons java class that declares a named constant to hold the number of quarts in a gallon (4). also declare a variable to represent the number of quarts needed for a painting job, and assign an appropriate valueโ€”for example, 18. compute and display the number of gallons and quarts needed for the job. display explanatory text with the values, for example:
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
Which text format is this, "the text is transcribed exactly as it sounds and includes all the utterances of the speakers. "?
Answers: 2
question
Computers and Technology, 23.06.2019 03:00
State 7 common key's for every keyboard
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
Which finger presses the h key on the keyboard? index finger on the left hand pinky finger on the right hand index finger on the right hand thumb on the left hand
Answers: 1
You know the right answer?
Super Cleanup Karel CodeHS. I have the code down which works for two of the five worlds. I can't fig...
Questions
question
Mathematics, 05.10.2020 15:01
question
Mathematics, 05.10.2020 15:01
question
Mathematics, 05.10.2020 15:01
question
Mathematics, 05.10.2020 15:01
question
Mathematics, 05.10.2020 15:01
Questions on the website: 13722361