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

List Comprehensions   Python has a very nice built-in  facility for doing  many  iterative methods, known as list comprehensions. The basic template is       [

how do you make an if and else statment work in pytho?

You should use for whenever you can, because  it creates  the structure of your  loops clear. Sometimes, however, you require to do an operation various times, but you don't want t

#question.Program 10 Assignment (Banking Objects – Savings/Checking Accounts) Create a program named 10.py that performs the following: Create a class named ChkAcct, and a class n

Structured data We will often  want  to work  with  large  groups of data.   Rather  than  providing  each  number its own  value,  we need  to manage the data  into natural s

Environments in Python Generally, Python establishes the following binding environments: 1.  builtin     : the mother of all environments: it contains the de?nitions of

Displaying random geometric graphs in an uniform square, unit disk, dense rim unit disk, and uniform sphere

Print vs Return Here are two different method declarations: def f1(x): print x + 1 def f2(x): return x + 1 What happens when  we call them? >>> f1(3) 4 >>

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