1.
1-How many genes are there in the file brca1line.fa?
Ans = 1
2-How many genes are there in the file brca1line.fa that are longer than 60?
Ans = 1
3-How many genes are there in the file brca1line.fa that have a C-G-ratio greater than 0.35?
Ans = 1
4-If dna is a String and cgcount is the integer number of C’s and G’s in the String, which one of the following is the correct return statement to return the decimal number of the ratio of C’s and G’s in the string to the length of the string?
Ans=
return ((double) countcg)/dna.length();
5-Consider the following code where dna is a String. This code attempts to count the number of “C”’s in dna but has an error. It has forgotten to update the variable start.
int countcg = 0;
int start = 0;
while (true) {
int pos = dna.indexOf("C", start);
if (pos == -1) {
break;
}
countcg += 1;
}
Which one of the following best describes how to fix this error?
6-Consider that storeAll is a method that returns a StorageResource of Strings. Which one of the following is a valid statement that would be useful in the storeAll method?
Ans=
StorageResource store = storeAll(s);
Yorumlar
Yorum Gönder