Define an array that contains amino acids in the right order


Assignment

A. Given the amino acid sequence of a polypeptide: Phe, Val, Asn, Gln, His, Leu, Cys, Gly, Ser; perform the following tasks with a program:

a. Define an array that contains the amino acids in the right order (use the three letters notation, as above). Print it in one line.

b. Determine the number of amino acids in the polypeptide and print it.

c. Add the amino acid "His" to the end of the polypeptide. Print the resulting array in one line.

d. Ask the user to enter a number between 1 and the number of amino acids in the polypeptide, and print the amino acid in that position (e.g. if the user enters "4" the program should print "Gln").

e. Create an inversion: get two positions in the sequence from the user and invert the sequence of the amino acids between them. For example, if the user enters 3 and then 6, the program should replace Asn, Gln, His, Leu with Leu, His, Gln, Asn. Print the array before and after the inversion.

B. Write a program that stores the following amino acids into an array:

Trp Arg Liu Ilu Asp

Then prompt the user to give you a number from 1 to the length of the array, and print the corresponding amino acid to the screen. So for instance if the user entered 3, you would print out Liu, and if the user entered 5, you would print out Asp. If the user gives you a number NOT in the range required, print out an error message.

C. Write a program to store the following DNA sequence into an array (not string):

CCGTAACGC (where every letter is an element of the array).

Then do the following:

a. Add a T to the end of the array, then print the array.
b. Remove the 1st element of the array and print it.
c. Add T to the beginning of the array and print the array.
d. Make your output neat and readable.

Format your assignment according to the give formatting requirements:

a. The answer must be double spaced, typed, using Times New Roman font (size 12), with one-inch margins on all sides.

b. The response also includes a cover page containing the title of the assignment, the course title, the student's name, and the date. The cover page is not included in the required page length.

c. Also include a reference page. The references and Citations should follow APA format. The reference page is not included in the required page length.

Solution Preview :

Prepared by a verified Expert
Data Structure & Algorithms: Define an array that contains amino acids in the right order
Reference No:- TGS03119466

Now Priced at $70 (50% Discount)

Recommended (94%)

Rated (4.6/5)