Hey everyone,
I need help trying to mutate a String.
For example.. I ask the person to input a number.
Then I ask them to input a String.
(The string they input can be any length, but must consist of only letters (A,C,G, or T)
The number they input is the amount of 'random' implications applied to that String.. and replaces a letter in a random position with either (A,C,G, or T)
I can assume that person types in the correct string (Exceptions don't matter)
Finally, I must Initialize this random number with the random seed value
“3735928559” (eg create “... = new Random(37359285 59L);’
So basically I know I have to implement some code to randomly select a position in the String, and "switch" it with a random character (A,C,G, or T)
It can be switched as many times as "n" is.. and "A" could in the end be switched to "A".
The only output should be a single line displaying the completed mutation.
Any help would be appreciated, I'll post my code once I've made a bit more progress.
Thanks!
I need help trying to mutate a String.
For example.. I ask the person to input a number.
Then I ask them to input a String.
(The string they input can be any length, but must consist of only letters (A,C,G, or T)
The number they input is the amount of 'random' implications applied to that String.. and replaces a letter in a random position with either (A,C,G, or T)
I can assume that person types in the correct string (Exceptions don't matter)
Finally, I must Initialize this random number with the random seed value
“3735928559” (eg create “... = new Random(37359285 59L);’
So basically I know I have to implement some code to randomly select a position in the String, and "switch" it with a random character (A,C,G, or T)
It can be switched as many times as "n" is.. and "A" could in the end be switched to "A".
The only output should be a single line displaying the completed mutation.
Any help would be appreciated, I'll post my code once I've made a bit more progress.
Thanks!
Comment