Daily Challenge (72 Part Series)
Hey there, it's time to get moving.
Today’s challenge is modified from user @JKphobic on CodeWars:
You live in a city where all roads are laid out in a perfect grid. You have the unfortunate habit of arriving too early or too late to your appointments, so you decide to create a Walk Generating App.
Any time you press the button, it will send you an array of one-letter strings representing directions to walk (eg. [‘n’,’s’,’w’,’e’]). You always walk only a single block in a direction. It takes one minute to traverse one city block.
Create a program that will return an array of one-letter strings representing the walk. The program should accept input for the amount of time the user decides to walk and should bring the user back to their starting location.
I wish the streets in my town were structured like this, it would make driving so much easier.
Good luck, happy coding!
Want to propose a challenge for a future post? Email firstname.lastname@example.org with your suggestions!