Solved:

Checkmark

Answered by AI, Verified by Human Experts

Need the answer for codehs 3.4.4 go down the slide part two please help me

Need the answer for codehs 3.4.4 go down the slide part two please help me

The given code orprogramhave someerrors, the corrected one is given below:functionstart() {// Go to the top of the stairsfor (var i = 0; i < 4; i++) {climbStep();}// Go down the slide and collect the ballsfor (var i = 0; i < 4; i++) {getABall();}}// Makes Karel climb up one step//Precondition: Karel is facing East at the bottom of a step//Postcondition: Karel is facing East on top of the next stepfunction climbStep() {turnLeft();move();turnRight();move();}// HasKarelgo down part of the slide to collect// one ball.// Precondition: Karel is facing East above a ball// Postcondition: Karel is facing East on the next ball (if there is one)function getABall() {move();takeBall();turnAround();move();turnAround();}// TurnsKarel180 degrees to face the opposite directionfunction turnAround() {turnLeft();turnLeft();}Thus, this is the correctedcode.For more details regardingcode, visit:brainly.com/question/20712703#SPJ2Your question seems incomplete, the probable complete question is:CodeHS Karel The Dog - 3.4.4: Go Down the Slide: Part Two*CODE ONLY FOR THAT PART*function start(){// Go go the top of the stairsfor(var i = 0; i < 4; i + 1){climbStep();}// Go down the slidefor(var i = 0; i <= 4; i++){getABall();}}// Makes Karel climb up one step// Precondition: Karel is facing East at the bottom of a step// Postcondition: Karel is facing East on top of the next stepfunction climbStep(){turnLeft();move();turnRight();move();}// Has Karel go down part of the slide to collect// one ball.// Precondition: Karel is facing East above a ball// Postcondition: Karel is facing East on the next ball (if there is one)function getABall(){move();turnRight();move();takeBall();turnLeft();}PLEASE TRY TO FIX THE CODE...

Unlock full access for 72 hours, watch your grades skyrocket.
For just $0.99 cents, get access to the powerful quizwhiz chrome extension that automatically solves your homework using AI. Subscription renews at $5.99/week.