Question: in java please Question Five We want to consider a variation of the 2D random walk we worked on in class. Instead of asking how

in java please
in java please Question Five We want to consider a variation of
the 2D random walk we worked on in class. Instead of asking
how long it takes our walker to reach the edge of an

Question Five We want to consider a variation of the 2D random walk we worked on in class. Instead of asking how long it takes our walker to reach the edge of an NXN grid, we want to ask how far away the walker is after N steps. In this case you can assume the grid is unbounded in size. You should compute the distance from starting point(0,0) using the Euclidean Distance formula: Vx2 + y2 Turn in a printout of the program and a printout of the output when the walker takes 100 steps. Question Four DNA is built up from four nucleotide bases which form the famous double helix: Adenine always pairs with Thymine and Guanine always binds with Cytosine. It can be a very useful abstraction to think of DNA as string on a four character alphabet, ignoring the double helix. Write a function that takes in a DNA string, counts the number of times that the symbols 'A', 'C', 'G', and 'T' occur in s, and prints out this information. Hint: The two string functions you will need to make use of are length() which returns the length of the string and charAt(i) which gives you the character in position i. You will want one counter for each of your nucleotides. (You might want to take a look back at the samples in section 4.6 of your zybook.) le

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!