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 a java gui business application

Create a Java GUI business application. This program may be any business application of your choice.

  Find wan organizations

Find WAN organizations (ISPs) that will connect you to the Internet or connect your offices. What services do they offer? What costs are involved?

  Provide a proof or a counterexample

We showed that since the problem concerning a machine halting on its own index is unsolvable, the general halting problem for Turing machines is unsolvable. Does this imply that any superset of an unsolvable problem is unsolvable? Provide a proof ..

  Why is the same not true if is replaced

Explain why replacing the extracellular with choline has little effect on the resting potential of an axon. Calculate the new resting potential with 90% of the extracellular removed. Why is the same not true if is replaced? (Assume the conductance..

  Write a program that prompts the user for an integer value

write a program that prompts the user for an integer value for a length of a youtube clip in seconds then display the number of hours

  What type information is carried by data bus and address bus

What type of information is carried by the Data Bus? The Address Bus?

  Function that finds the smallest element

Function that finds the smallest element in an array of double values using the following header: double min(double array[], int size)

  Different kinds of tasks which humans could perform by ai

Intelligence use AI to do different kinds of tasks which only humans could perform. Research Internet and explain how AI works to make bots resemble human intelligence.

  What does cissp stand for

What does CISSP stand for? Using the internet, find out what continuing education is required for the holder of a CISSP t remain current and in good standing.

  Draw and name a one-dimensional array

Draw and name a one-dimensional array that would hold 10 temperatures. Number the elements. I am supposed to finish those 1 to 6 questions for my assignment. please help me.

  What is the value of the key and the new register

In the n-stage nonlinear feedback shift register (NLFSR), if the current register is 0010, function f is f(R3, R2, R1, R0) = R3 or R2 or R1 or R0,what is the value of the key and the new register?

  Copy and paste the code

Copy and paste the code below in a filename LastFirst_lab43.cpp (e.g. DoeJoe_lab43.cpp) and save it in Lab 4 folder. Bring in the LastFirst_lab43.cpp program from the Lab 3 folder.

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