Support Forums

Full Version: Python Particle Simulation...HELP..PLEASE...URGENT!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys, I needed help with a question. I can't figure it out no matter what I do. Please...help Sad

Imagine a "particle" located on the centre square of a two‑dimensional grid of dimensions 11 by 75. The particle can only move one square at a time, either up, down, left, or right. Associated with each possible motion are the following probabilities:



Up 1/12

Down 1/12

Left 1/24

Right 19/24



Write a program that simulates the motion of the particle within the grid, until it reaches an "exit" at the square in row 6, column 75. The particle cannot "penetrate" any of the four boundaries. Have the program repeat the simulation 10 times and calculate the average total distance travelled by the particle until it exits.