Particle Movement, Python Programming

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.
Posted Date: 11/5/2012 7:24:24 PM | Location : Canada







Related Discussions:- Particle Movement, Assignment Help, Ask Question on Particle Movement, Get Answer, Expert's Help, Particle Movement Discussions

Write discussion on Particle Movement
Your posts are moderated
Related Questions
What are squared matrices?

Your assignment for the semester will involve the development of a system for drawing trees using the Python programming language and the turtle graphics module (turtle.py). Comple

Simple expressions A cornerstone of a programming language is the  ability  to compute expressions.  We will start here  with  arithmetic expressions, just to take the  concep

Analytical models Analytical tools  are very important.  It may  be hard  to check  the  correctness of a machine by trying it in several possible  initial  conditions with  al

Worked example 1   Let's examine what  happens when  we compute the following Python code:   def p(x, y): z = x*x - y return z + 1/z   >>> p(1.0, 2.0) -2.0

Tower of Hanoi game that you can let a player to move discs between the towers using a mouse. Moreover, you are required to do the followings: •Graphically represent any state in t

how to make a python programme for van der waals equation of state with surface discontinouty

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

1)    Write a python programmecomparing for and while loops like the following. Math Times table For Loop: 2x1=2 2x2=4 ..... 2x12=24 While Loop: 3x1=3 3x

Perimeter of a polygon Now, let's consider the problem of computing the length  of the perimeter of a polygon. The input is a structure of vertices,  encoded as a list of list