When one see a posted code, one needs to count the minutes until its author get striked by the Lighting of Moderation. The distance of the moderator to its desk could then be derived by the mean of a simple division.
In part 1 and 2 (Straight line and Up), I get: Expected a movement (one of N, NE, E, SE, S, SW, W, NW) but found ‘E’
In part 3 and 4 it works until Thor has to move horizontaly or vertically, then he moves off the map.
What should I do?
Already asked 7 posts above and, without surprise, the answer didn’t changed: ‘E’ is the textual representation of a character (1 letter + 2 simple quotes), not the output of a string of one letter.
I’m working in Python 3 and I’m having problems with the print function.
From what I can tell by testing my code, all of it is functional, except I cannot work out how to concatenate the two strings I need to print out (the direction_x and direction_y values). When I write only [print(direction_x)] as the last line, it works for the first test - unsurprisingly, as that one does not require a movement on the y-axis - but obviously that’s not going to work for all of them. I tried [print(direction_x, direction_y)] thinking that would solve the problem, but to no avail. Thor only stands motionless and watches the world burn.
Hi! Please tell me, my code works for 1 and 3 parts (Power of Thor), but for 2 and 4 it does not work. He is going a long way and he did not have enough energy.
part of the code: