Display the lowest number of moves it took for the mole to


Having a lot of trouble with this, any help would be appreciated.

Write a program to make the mole take a walk through the island. The mole is allowed to travel only one square at a time, either horizontally or vertically.

A random number between 1 and 4 should be used to decide which direction the mole should take. Example: 1 may equal North, 2 South, etc...

The mole drowns when it hits the water but escapes when it crosses the bridge. What are the moles chances of getting off the island safely?
Restart the mole 1000 times and count the number of times it escapes. Display the number of times it escapes and the percentage of successful escapes. Display the lowest number of moves it took for the mole to escape and how many times did the mole escape in that fewest number of moves?

Many times the mole will drown. Use a counter to count the number of times it finds the bridges. Hint: you will use a 2-dimensional array. You may need to use a FOR loop with a WHILE loop inside of it. Hint 2: What is the Array Location of the two bridges? Remember that two dimensional arrays have two subscripts. The right side bridge (the east bridge) is at location ( 3 , 5 ) Row 3 Column 5, since the first array element subscript is Zero.

Rows are 0, 1, 2, 3, 4, 5. Columns are the same: 0, 1, 2, 3, 4, 5

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Display the lowest number of moves it took for the mole to
Reference No:- TGS0646415

Expected delivery within 24 Hours