about | help | code help+videos | done | prefs |
Write a method that accepts an integer that represents the binary encoding of nitrogenous bases in RNA. These bases are encoded according to the following scheme: binary 00='U', binary 01='C', binary 10='A', and binary 11='G'. Return the correct character (U, C, A, or G) based on the value of the input parameter. If an invalid integer is passed in (not equivalent to binary 00, 01, 10, or 11) return an 'X' as an error code. getRNA(2) → "A" getRNA(1) → "C" getRNA(5) → "X" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 210
Copyright Nick Parlante 2017 - privacy