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

 

mic@mathcs.emory.edu lab2 > basecomp
prev  |  next  |  chance

Given a string b representing a single DNA base ('A', C', 'G', or 'T') return a string representing its complementary base ('T', 'G', 'C', or 'A'). For any other input string b, return it unchanged.


basecomp('A') → 'T'
basecomp('C') → 'G'
basecomp('X') → 'X'

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

def basecomp(b):

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

Python Help

Difficulty: 110

Copyright Nick Parlante 2017 - privacy