def main(): print "Hello!" print "This program takes a DNA sequence and transcripts it to RNA sequence." dna=raw_input("Please, input a DNA sequence (it should consist of A,C,G, and T only):") check = True # used to indicate if a symbol other than A,C,G or T is met # in DNA sequence rna=str() # initialize RNA sequence to empty string for char in dna: if (char != "A" and char != "C" and char != "G" and char != "T" ): check=False break elif char == "A": n="U" elif char == "C": n="G" elif char == "G": n="C" else: n="A" rna = rna + n #appending the corresponding nucleotide to RNA sequence if check == True: print "The provided DNA:",dna print "The transcipted RNA:",rna else: print "The provided DNA sequence has at lease one symbol other than A,C,G, or T" print "Have a good day!" main()