[Mš Challenge] Grid Walking ā¬āŖšāŖā¬
Monday Blue š Challenge Series #6 Let's get moving this week! This time we will calculate the Euclidean distance from point A to B based on the path travelled on an unbounded grid. š¼ TASK Write a program to accept a string to indicate the path travelled with the following symbol:- [ N ] orth ā¬ļø [ E ] ast ā”ļø [ W ] est ā¬ ļø [ S ] outh ā¬ļø and then output the straight-line (shortest) distance between the original position and final position. In case you're unfamiliar, you'll need to apply the distance formula from Pythagorean Theorem for this challenge. š š§ TEST CASE "NE" 1.41 "WWW" 3.00 "NNNNN" 5.00 "EEENNNN" 5.00 "ENENENN" 5.00 "EEEWWW" 0.00 "SSWENNEW" 0.00 "SWSWSWSWSWSWSESWSESWSES" 13.00 ā¤ BONUS Creative and clear-cut approach is encouraged. Happy Coding!!! šš»