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
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

from urllib2 import urlopen # Open http://placekitten.com/ for reading on line 4! response = kittens.read() body = response[559:1000] # Add your ''print'' statement here!

python program of motion of a particle in viscus medium

Procedures in python Procedures are computer program creates that let us capture common patterns of computation by: Grouping together sequences of statements

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


Procedure calls When you compute an expression of the form ( ,  ..., )   the Python interpreter treats  this as a procedure call. It will be simpler to talk about

Import the sample code below into the Python IDLE and enhance it, run it and debug it. Add features to make this a more realistic database tool by providing for easy data entry an

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

inputWithinRange (prompt, lowValue, highValue) This function will ask for a number using the prompt parameter. The function will only return a value that is within the inclusive ra