QUESTION IMAGE
Question
question: 3 if karel starts at street 1 and avenue 3 facing east, what street (row) and avenue (column) will karel be on after this code runs? move() move() move() turn_left() move() street 1 and avenue 3 street 4 and avenue 4 street 2 and avenue 6 street 6 and avenue 2
Step1: Initial position
Karel starts at Street 1, Avenue 3 facing East.
Step2: First three moves
Each move() moves one unit in the facing - direction. Since facing East, after 3 move() commands, Karel is at Street 1, Avenue 6.
Step3: Turn left
turn_left() makes Karel face North.
Step4: Final move
One more move() moves Karel 1 unit North. So Karel is at Street 2, Avenue 6.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
Street 2 and Avenue 6