Respuesta :
Answer:
Char Acid [4];
Cin.get (acid, 7);
cin.ignore ();
for(int i=0; i<4; i++)
{ cin.get (acid,4) ;
for (int j=0; j<3; j++)
cout << acid[j];
cout << endl;
Answer:
#Python
1. def Triad(dna):
2. dna = list(dna)
3. fourTriad = dna[7:19]
4. print(fourTriad)
5. return(dna)
Explanation:
We define a function called Triad that receives a string with a DNA sequence composed of A-C-G-T letters, then we transform this string into a list, to finally take the elements 7 to 18 (In python the first element is the element zero).
An example of the code:
Triad('ACAAGTCGATGAGCGATGCGATCAGTAGCGGGCTGGATGCTGCTAGATCGCAGCATGACGTACTGACTGT')
Output:
['G', 'A', 'T', 'G', 'A', 'G', 'C', 'G', 'A', 'T', 'G', 'C']