Translating RNA into Protein

Intermediate Translation Codons Genetic Code
Significance:
This is the third and final act of the Central Dogma: mRNA → protein, decoded three nucleotides (a codon) at a time using the (nearly) universal genetic code. Every gene annotation tool, every ORF finder, and every protein-prediction pipeline implements exactly this step. Getting comfortable with the codon table is essential before tackling splicing or ORF-finding problems later in this bank.
Statement

Given an RNA string whose length is divisible by 3, translate it into a protein string using the **standard genetic code**. Reading begins at the first nucleotide, proceeds in non-overlapping codons of 3, and translation **stops** at the first stop codon (`UAA`, `UAG`, or `UGA`) — the stop codon itself is not represented in the output.

Sample Input
AUGGCCAUGGCGCCCAGAACUGAGAUCAAUAGUACCCGUAUUAACGGGUGA
Sample Output
MAMAPRTEINSTRING
Constraints

- `1 ≤ length(RNA) ≤ 999`, divisible by 3
- The RNA string may or may not end with a stop codon; if none is found, translate to the end of the string


My Notes
Log in to save personal notes.
Console output will appear here when you click Run Code or Submit...
Enter DNA / RNA / Protein test string
Next Problem
Frequent Words (Most Frequent k-mers)