Question: Please help!! I need to write a flow chart algorithm for the following problem and I'm stuck!: Imagine yourself in the middle of Manhattan, where
Please help!! I need to write a flow chart algorithm for the following problem and I'm stuck!:
Imagine yourself in the middle of Manhattan, where the streets are perpendicular on avenues. You are in a grid of streets, somewhat lost, and you randomly pick one of four directions and walk to the next intersection. Not knowing where you really want to go, you again randomly pick one of the four directions, and so on. After repeating the same movement for a number of times, you may want to know how far you got from the original point.
Represent locations as integer pairs(x,y). Create an algorithm that implements your movement through New York City, over 100 intersections, starting at (0,0) and print the ending location, taking into consideration that each movement, from one intersection to another will be one mile.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
