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
The goal of this exercise is to write a \business phrase" generator, which each time it is called produces lines of business speak, such as: It's time that we became uber-effici

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

Write a program on python to give solution for driven and damped rlc circuit

In English, specify a representation of the board game in Python. The representation should capture the entire state of the game at one point in time. It may be helpful to first fi

Task (Anagrams) Write a function that checks whether two words are anagrams. Two words are anagrams if they contain the same letters. Fore example, silent and listen are anagrams.

I have a C++ code (10-15 line) which i need to re-write in python with the help of ctypes library. Is it possible i can get some help with it? Thanks & regards Tanmoy

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

We encourage you to adopt an interactive style of debugging and programming. Use the Python shell a lot. Write short pieces of code and check them.  It is much  simpler to test the

Common Errors and Messages Here are some common Python errors  and error  messages to look  out for. Please let us give if you have any favorite additions for this list.

#que Write a program that will take price data for stocks and print it graphically to the screen. Your program should begin by asking the user for the file name. It should then cre