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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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