The Drunkards Walk. A drunkard in a grid of streets randomly picks one of four directions and

Question:

The Drunkard’s Walk. A drunkard in a grid of streets randomly picks one of four directions and stumbles to the next intersection, then again randomly picks one of four directions, and so on. You might think that on average the drunkard doesn’t move very far because the choices cancel each other out, but that is actually not the case. Represent locations as integer pairs (x, y). Implement the drunkard’s walk over 100 intersections, starting at (0, 0), and print the ending location.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: