Question
** CodeHS AP CSP 5.7.5 Making Karel Move ** PLEASE ANSWER THIS QUESTION USING PYTHON Karel doesnt know how to move! Since we arent using
** CodeHS AP CSP 5.7.5 Making Karel Move **
PLEASE ANSWER THIS QUESTION USING PYTHON
Karel doesnt know how to move! Since we arent using the built in Karel commands, well have to make the image of Karel move using Python!
Your job is to implement the move() function.
You do not need to worry about running into walls.
You do not need to modify any of the other code function. The final result should have Karel move forward (east) twice, then move in a square. Karel should end on the first street, fourth avenue, facing south.
HINTS Your move function should change the X_POS and Y_POS variable based on the direction that Karel is facing. For example, if direction is NORTH, then Karel should move in the negative y direction. If direction is SOUTH, then Karel should move in the positive y direction, etc.
Once you update the X_POS or Y_POS, you can then set a new position by calling the .set_position method.
Karel should move a distance of KAREL_SIZE.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started