id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us > getOneBinaryRNA
prev  |  next  |  chance

Write a method that accepts a character that represents one nitrogenous base 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 a string that shows the binary representation of the base 'ltr' that is the input parameter. If an invalid 'ltr' is passed in, return the string "error" to indicate that there was an error.


getOneBinaryRNA("X") → "error"
getOneBinaryRNA("5") → "error"
getOneBinaryRNA("J") → "error"

...Save, Compile, Run (ctrl-enter)

public String getOneBinaryRNA(char ltr) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 230

Copyright Nick Parlante 2017 - privacy