376,901 views
22 votes
22 votes
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.

User Openquestion
by
3.1k points

1 Answer

12 votes
12 votes

Answer:

its c so its c

Step-by-step explanation:

User Droidmad
by
2.4k points