> Given: A protein string P of length at most 1000 aa.
> Return: The total weight of P. Consult the monoisotopic mass table.
The "monoisotopic mass table" appears to be a link. I get a pop-up, but nothing appears in it, other than a spinner. I had to do a web search to find http://rosalind.info/glossary/monoisotopic-mass-table/ .
The page continues:
> Sample Dataset - SKADYEK
> Sample Output - 821.392
Using the monoisotopic mass table I computed:
>>> d = {'A': 71.03711, 'C': 103.00919, 'D': 115.02694,
'E': 129.04259, 'F': 147.06841, 'G': 57.02146,
'H': 137.05891, 'I': 113.08406, 'K': 128.09496,
'L': 113.08406, 'M': 131.04049, 'N': 114.04293,
'P': 97.05276, 'Q': 128.05858, 'R': 156.10111,
'S': 87.03203, 'T': 101.04768, 'V': 99.06841,
'W': 186.07931, 'Y': 163.06333}
>>> sum(d[c] for c in "SKADYEK")
821.3919199999999
This matches the example. BUT!!!!This is NOT the correct answer because as the expanded text says, "the mass of a protein is the sum of masses of all its residues plus the mass of a single water molecule."
The table says "the monoisotopic mass of water is considered to be 18.01056" so
>>> 821.3919199999999 + 18.01056
839.40248
This latter number matches the value given by https://web.expasy.org/cgi-bin/compute_pi/pi_tool .Which means the example answer ... is wrong. Yes?
How (in)correct are the other answers? I-am-not-a-bioinformatics-programmer.