Write a program to make mole take walk through the island

Assignment Help Basic Computer Science
Reference no: EM13306366

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. Could anyone help me with this I am having trouble figuring out the loop to make the mole travel through the island.

Reference no: EM13306366

Questions Cloud

An array-based queue for bcs registration : objective of this assignment is to use C++ to queue studentsinto an array-based queue for BCS registration. Students have the option of taking five different courses, but each course can only hold 8 students.
What is the minimum energy necessary to compress vapor : What is the minimum energy necessary (in kJ) to compress 1.0 kg of saturated water vapor at 1 bar to a pressure of 60 bar in a perfectly insulated vessel
The team to buy-in to the vision : What activities can a leader use to help get the team to buy-in to the vision so that it becomes a shared vision?
Write a java program that asks the user to enter a distance : Write a Java program that asks the user to enter a distance in meters. The program will then present the following menu of selections.
Write a program to make mole take walk through the island : Many times the mole will drown. Use a counter to count the number of times it finds the bridges. Could anyone help me with this I am having trouble figuring out the loop to make the mole travel through the island.
Write java program that allows the user to enter wall space : Write a Java program (from scratch) that allows the user to enter the wall space to be painted and the price of paint per gallon.
Covert these equipment designs to normal lab apparatus : Covert these equipment designs to normal lab apparatus - But please draw them beautifully use software.
Determine the minimum uncertainty in the blocks speed : A 0.50 kg block rests on the icy surface of a frozen pond, which you can assume to be frictionless. what is the minimum uncertainty in the block's speed
Create the needed constructors : In this assignment you will be implementing three classes -Date (you would reuse the Date class after implementing toString() and equals() method), Employee and EmployeeTest with main method to test Employee class.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What is the improvement factor resulting

what is the improvement factor resulting from the use of the cache assuming that the LRU algorithm is used for block replacement?

  Describe emerging technologies and trends

What technologies do you see becoming mainstream in the next 18 months, 5 and 10 years.

  Question based on artificial intelligence

If the brain is a computer and the mind its workings, is this fitting analogy of the computer and its software? What would happen if we had dedicated computers with a huge number of neuron circuits?

  Hierarchy chart and then plan the logic

Draw the hierarchy chart and then plan the logic for a program needed by the sales manager of The Henry Used Car Dealership. The program will determine the profit on any car sold

  Write a program which includes a user defined function

write a program which includes a user defined function named Upper. The function is passed a single char. It will return 1 if the char is upper case, i.e. between 'A' and 'Z'. it will return 0 otherwise.

  Create the following for bet charts

The Banking e-Teller system allows bank customers to perform ATM transactions from their cell or smart phones. BET will allow customers to check balances, make remote photo capture check deposits, and perform balance transfers to their checking or..

  Declare a delegate using the keyword delegate

How are these examples of predefined control events and its usage in programming•Delegate-Object that contains a reference to a method

  What is average seek time

Tracks traversed Disk receives a request to access a random sector on a random track. Assume the head starts at track 0. What is the average seek time?

  Deadlock prevention

In  deadlock prevention , we constrain resource requests to prevent at least one of the four conditions of deadlock (Mutual exclusion, Hold and wait, No preemption, Circular wait). This is either done indirectly, by preventing one of the three necess..

  Adding two unsigned and signed binary numbers

Add the two binary numbers and interpret the sum assuming that the numbers are (1) unsigned, and (2) signed.

  Show how mips can implement the instruction swap

Show how MIPS can implement the instruction swap $rs $rt, which swaps the contents of registers $rs and $rt. Consider the case in which there is an available register.

  Section on access controls

Refer to the section on Access Controls. What is the difference between "authorization" and "authentication"? What do we use to perform each of these access control functions? What are the advantages and limitations of the different approaches?

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