Display the lowest number of moves

Assignment Help Basic Computer Science
Reference no: EM13307729

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.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

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

Reference no: EM13307729

Questions Cloud

A beginning business analyst : A beginning business analyst, you have been tasked by the project manager to develop the system requirements related to the handling of outstanding purchase orders.You decided that the first step in this task was to observe the business processes in ..
What is the height of its image formed by the magnifier : The focal length of a simple magnifier is 7.60 cm. Assume the magnifier to be a thin lens placed very close to the eye. what is the height of its image formed by the magnifier
Create a gui panel using radio buttons to display : Create a GUI panel using radio buttons to display and select the flags and text information.
Evaluate the megatrend of demographics in the it field : Evaluate the megatrend of demographics in the IT field. Give your opinion as to why IT managers must understand this megatrend when selecting talent for organizational positions.
Display the lowest number of moves : 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?
Determine length of an interval of time for atleast one call : determine the length of an interval of time such that the probability of at least one call in the interval is 0.90
Determine power is dissipated in the resistor : A step-down transformer has a turns ratio of 1:10, and its primary is connected across the terminals of a standard 120-V wall socket. What power P is dissipated in the resistor
What is the current state of the quiznos brand : What is the current state of the Quiznos brand?
How much does each inter-atomic bond stretch : A copper wire is 2 meters long. when a certain load is hung from the wire, making sure the wire is straight, how much does each inter-atomic bond stretch

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Create queue class should have the following methods

create queue class should have the following methods:

  Write dissolve method for three color components

It does this by incrementing (by 1) all three color components (using the above accessor and mutator methods) as well as the alpha component value. Write down dissolve method.

  You are to design and develop three html5 pages

You are to design and develop three HTML5 pages themed on Manchester. The pages should be optimised for delivery on a tablet, and should contain the following:

  Investigate and compare winpcap

Investigate and compare WinPcap and two other network packets capture software Products.

  4 bit binary representation using excess 7

Assuming a 4 bit binary representation using excess 7 list all bit sequences for integers -7 to +8

  The strike predicate need not work

Define a predicate strike(X,Y,Z) that succeeds if and only if the list Z would be obtained if one were to remove all occurrences of element X from list Y. The strike predicate need not work well when Y is an unbound variable.

  Show her to install and used it in my network administration

and show her to install and used it in my network admistaion class

  Compare results search and identify any differences

There are several options of search engines, including Yahoo, Google, DogPile, and Maholo. Using the listed search engines above, search for something that interest you

  Create an ou design diagram

Create an OU design diagram. Prepare a graphical representation of the group structure if groups are included in your quantified graphic presentation.

  Create a visual basic program that creates a bill

Create a Visual Basic program that creates a bill for an automobile repair shop. The shop bills customers at the rate of $35 per hour for labor. Parts and supplies are subject to a 5% sales tax.

  Write a xml schema for the validation of the document notes

write a XML schema for the validation of the document notes.xml

  Which service to select to achieve operational excellence

Consider not only costs but also such issues as delivery speed, pickup schedules, drop-off locations, tracking ability, and ease of use of the website. Which service did you select? Explain why.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd