Untitled

 avatar
unknown
plain_text
9 months ago
390 B
5
Indexable
#1. Print a DNA sequence that could be in upper and lower caps into a new sequence that is in upper caps only
#a
seq=input("Enter a new DNA sequence")
seq2=''
for i in range(len(seq)):
  if seq[i]=='a':
    seq2=seq2+'A'
  elif seq[i]=='t':
    seq2=seq2+'T'
  elif seq[i]=='c':
    seq2=seq2+'C'
  elif seq[i]=='g':
    seq2=seq2+'G'
  else:
    seq2=seq2+seq[i]
print(seq2)
Editor is loading...
Leave a Comment