Diagonal Stripe
Medium · Functions
Draw a diagonal line of balls, starting where Karel stands and going up and to the right, one square east and one square north each time. Stop as soon as Karel reaches the right wall or the top wall.
Write a function that takes one diagonal step and comes out facing east again. The rooms have different sizes, so check both the front and the left before each step. && means "and".
Next: Climb the Stairs