about | help | code help+videos | done | prefs |
Write a method that accepts a string representing a sequence of DNA. You are supposed to either find the matching DNA base-pairs, or find the transcribed RNA. If the value of the Boolean variable 'transcribe' is false, return the matching DNA base-pairs, while if 'transcribe' is true, return the sequence for the transcribed RNA). Look at the test data for examples. Note: DNA Base-pairing rules A-->T and T-->A, G-->C and C-->G; RNA Base-pairing rules A-->U and T-->A, G-->C and C-->G. basePairs("TTAACCCCGGGA", false) → "AATTGGGGCCCT" basePairs("CGGGGTTA", true) → "GCCCCAAU" basePairs("CCATGGTTGAGACCATCCGATAAGCTCGACGA", true) → "GGUACCAACUCUGGUAGGCUAUUCGAGCUGCU" ...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: 250
Copyright Nick Parlante 2017 - privacy