[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!!! 😁💻