Question: Write a program that will have Karel climb a series of walls, with the height of each wall not exceeding 3 sections tall. Karel will
Write a program that will have Karel climb a series of walls, with the height of each wall not exceeding sections tall. Karel will be expected to move from avenue street initially facing East by climbing walls until he reaches Avenue street facing East. The attached world file Wall Climber.kw Download Wall Climber.kw is an example of what the worldCOULDlook like. To download a copy of the world file, simply click the icon to the right of the file and save it to the same location as your Karel program. Make sure you do not doubleclick on this file to open it it MUST be opened from within the Karel program. Upload only your program file on this one. I will run your program against a world of my making and your program should run without modifications inside my world file. The world file I will use will NOT violate any of the conditions above.
The Rules:
Karel is initially facing East on Street Avenue with no beepers in his bag
Karel will NOT pick up nor place, any beepers in this program.
Karel will be expected to determine if he needs to climb a wall in front of him. If he does, he climbs it If there is no wall directly in front of him, he will simply move to the next corner and check for a wall there to climb. Karel will also climbONLYas high as he needs to in order to clear the wall do NOT have him climb sections if only one or two are there!
Karel will climb any and all walls between Avenue and Avenue
Karel ends at Street Avenue facing East.
You MUST use nested IF statements to climb the walls. I willNOTaccept a program that uses a loop to get Karelupordownthe wall.If you use loops to have Karel climb up or down the walls, you will receive a for this assignment.I want you to see how meticulous nesting if statements can be The only place in this program you can and I expect you to use a loop in this program is to have him iterate your overall module times to get him from Avenue to Avenue
No errorshutoffs
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
