7 kyu

Percentage of amino acids

287 of 454JasperGeh

Description:

You are a biologist working on the amino acid composition of proteins. Every protein consists of a long chain of 20 different amino acids with different properties. Currently, you are collecting data on the percentage, various amino acids make up a protein you are working on. As manually counting the occurences of amino acids takes too long (especially when counting more than one amino acid), you decide to write a program for this task:

Write a function that takes two arguments,

  1. A (snippet of a) protein sequence
  2. A list of amino acid residue codes

and returns the rounded percentage of the protein that the given amino acids make up. If no amino acid list is given, return the percentage of hydrophobic amino acid residues ["A", "I", "L", "M", "F", "W", "Y", "V"].

Fundamentals

Stats:

CreatedJul 24, 2017
PublishedJul 24, 2017
Warriors Trained888
Total Skips61
Total Code Submissions2453
Total Times Completed454
Python Completions287
JavaScript Completions191
Total Stars11
% of votes with a positive feedback rating87% of 173
Total "Very Satisfied" Votes137
Total "Somewhat Satisfied" Votes28
Total "Not Satisfied" Votes8
Total Rank Assessments59
Average Assessed Rank
6 kyu
Highest Assessed Rank
3 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • JasperGeh Avatar
  • Chrono79 Avatar
  • Blind4Basics Avatar
Ad