Changes

From Biolecture.org

Minsu Kim/python/Rosalind / problem10

321 bytes removed, 21:46, 12 December 2017
no edit summary
<p><img alt="" src="/ckfinder/userfiles/images/bandicam%202017-12-12%2021-33-53-945.jpg" style="height:252px; width:639px" /></p>
<p>f = open(&#39;rosalind_ba1mrosalind_ba1l.txt&#39;,&#39;r&#39;)<br />ind seq = int(f.readline())<br />k = int(f.readlinestrip())<br />
f.close</p>
<p>a = []0<br />for i in range(0,klen(seq)):<br />&nbsp; &nbsp; d if seq[i] = 4**(k-i-1)<br />&nbsp; &nbsp; count = 0<br />&nbsp; &nbsp; if d &gt; ind:<br />&nbsp; &nbsp; &nbsp; &nbsp; a.append(&#39;A&#39;)<br />&nbsp; &nbsp; else:<br />&nbsp; &nbsp; &nbsp; &nbsp; while(d&lt;=ind):0<br />&nbsp; &nbsp; if seq[i] == &nbsp#39; C&nbsp#39; &nbsp; &nbsp; ind -= d:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; count +d = 1<br />&nbsp; &nbsp; &nbsp; &nbsp; if countseq[i] ==1:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; a.append(&#39;CG&#39;):<br />&nbsp; &nbsp; &nbsp; &nbsp; if count=d =2:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; a.append(if seq[i] == &#39;GT&#39;):<br />&nbsp; &nbsp; &nbsp; &nbsp; if count=d =3:<br />&nbsp; &nbsp; &nbsp; &nbsp; d = d*(4**(len(seq)-i-1))<br />&nbsp; &nbsp; a.append(&#39;T&#39;)+= d<br />print(&quot;&quot;.join(a))</p>
Anonymous user

Navigation menu