Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4.6 Counting Amino Acids Protein sequences are made up of 20 different amino acids, each represented by a different letter of the alphabet. The valid

4.6 Counting Amino Acids

Protein sequences are made up of 20 different amino acids, each represented by a different letter of the alphabet. The valid letters are A, C, D, E, F, G, H, I, K, L, M, N, P, Q, R, S, T, V, W, and Y.

Write a program that reads in a protein sequence as a string and counts the number of each kind of amino acid in the sequence. Use a dictionary to accumulate the counts. Your program should not have a long series of "if/elif" statements!image text in transcribedimage text in transcribed

14.6 Counting Amino Acids Protein sequences are made up of 20 different amino acids, each represented by a different letter of the alphabet. The valid letters are A, C, D, E, F, G, H, I, K, L, M, N, P, Q, R, S, T, V, W, and Y. Write a program that reads in a protein sequence as a string and counts the number of each kind of amino acid in the sequence. Use a dictionary to accumulate the counts. Your program should not have a long series of "if/elif" statements! (1) Display a count for each amino acid with a non-zero value, like this: A 43 C 11 D 50 Y 22 (2) After the list, the total number of different amino acids in the sequence should be printed: A 43 C 11 D 50 Y 22 Number of different amino acids: 19 (3) Finally, print out any amino acids that did not appear, like this: A 43 C 11 D 50 Y 22 Number of different amino acids: 19 No occurrences of E, G, or w The missing amino acids are in alphabetical order, separated by a comma, with the word 'or' separating the last two. If there are only two missing acids, you should output something like No occurrences of E or G, and if only one is missing, you should output something like No occurrences of W. LAB ACTIVITY 14.6.1: Counting Amino Acids 0/12 main.py Load default template... acids is a SET containing the list of valid amino acids HNMONDO acids = [ 'A', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'V', 'W', 8 ] I TV 10 print ("Number of different amino acids: -----" 12 print ('No occurrences of ----' 13 print ('No occurrences of ---' Develop mode Submit mode Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box. Enter program input (optional) If your code requires input values, provide them here. Run program Input (from above) main.py (Your program) Output (shown below) Program output displayed here

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transactions On Large Scale Data And Knowledge Centered Systems Xxxviii Special Issue On Database And Expert Systems Applications Lncs 11250

Authors: Abdelkader Hameurlain ,Roland Wagner ,Sven Hartmann ,Hui Ma

1st Edition

3662583836, 978-3662583838

More Books

Students also viewed these Databases questions

Question

What is Working Capital ? Explain its types.

Answered: 1 week ago