<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
hi<div>i am stuck in these questions can someone please help me in solving and writing programme for these tasks</div><div><br></div><div>please help me<br><div>
<p align="center"><font color="#66ff66" size="4"><strong></strong></font></p><font color="#3333cc" size="5"><strong><font size="4">
<p align="center"><font class="Apple-style-span" color="#000000" size="3"><span class="Apple-style-span" style="font-size: 13px; font-weight: normal;"><br></span></font></p></font></strong></font></div></div><div><br></div><div><div>1</div><div>&nbsp;1.1 Write a Python program with a loop that prints out a sequence of numbers as follows:</div><div>15</div><div>13</div><div>11</div><div>...</div><div>3</div><div>1</div><div>-1</div><div><br></div><div><br></div><div>1.2 Write a small Python program that generates the list of all pairs of characters c and</div><div>its doubling 2  c, where c moves through all the letters of the string "foobar" and prints it out.</div><div>The result will look like:</div><div>[(’f’, ’ff’), (’o’, ’oo’), (’o’, ’oo’), (’b’, ’bb’), (’a’, ’aa’), (’r’, ’rr’)]</div><div>Hint: use list comprehensions.</div><div><br></div><div>1.3 Write a small Python program that</div><div><br></div><div>1. prints out the length of the string</div><div>’taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu’</div><div><br></div><div>2. prints out how many different characters this string contains</div><div><br></div><div>3. replaces all the non-’t’ characters in above string with dots ’.’. So, if the word were’tattoo’, it would print ’t.tt..’.</div><div>Hints:</div><div><br></div><div>(a) use a function to t-ify the string</div><div><br></div><div>(b) there are various ways to construct the string, either using the join method or by running</div><div>a loop accumulating substrings.</div><div><br></div><div>(c) check also out what happens if you apply the conversion list(s) to a string s.</div><div><br></div><div>2&nbsp;</div><div>2.1 Write a function count char(s, c) that takes a string s, and a character c and returns</div><div>how often the character c appears in the string.</div><div>For example count_char("tattoo", "t") should return 3.</div><div><br></div><div><br></div><div>2.2 Write a Python function char_freqency(s)that returns a dictionary which, for each</div><div>character of s as a key, stores as value how often this character appears.</div><div>For example, char_frequency("tattoo") could return {’a’: 1, ’t’: 3, ’o’: 2} (the order of</div><div>key:value pairs does not matter here).</div><div><br></div><div>Hint: Consider using the function count_char defined in 2.1.</div><div><br></div><div>2.3 Write a program that translates a given string (of arbitrary length) of DNA bases into</div><div>the RNA strand that it will produce. For this, research which DNA bases correspond to RNA bases</div><div>and create a translation table (not an if...else clause!) in the Python program. [4 marks]</div><div><br></div><div><br></div><div><br></div><div>3&nbsp;</div><div><br></div><div>3.1 consider the following list of base sequences:</div><div>ACGTACCTTACTTACCAT</div><div>ATCGTACCTCTTACTCAT</div><div>The task consists of writing a Python program that performs a simple alignment algorithm on</div><div>these two strings and prints out this alignment in a suitable readable form. Give a brief comment</div><div>explaining the output format.</div><div>Hints:</div><div>1. Matching means the following: for a given sequence to be matched, your program should denote</div><div>which bases correspond to bases in the reference sequence and which do not; in addition, mark</div><div>gaps where the reference sequence contains bases which are not present in the sample sequence.</div><div>For a given sample sequence, your matching algorithm will attempt to match as many bases</div><div>as possible to those of the reference sequence.</div><div>2. This is a difficult assignment. Do not attempt it before you have solved the others.</div><div>3. For this purpose, you are allowed to research and implement publicly documented versions of</div><div>the Needleman-Wunsch algorithm or similar algorithms (however, make sure that you refer-</div><div>ence them properly!). Also make sure that your program prints out the matches/mismatches</div><div>between the sequences. You should demonstrate at least two different alignments by using</div><div>different gap penalties.</div><div>Instead of following this hint, you can develop an alternative solution to the matching problem,</div><div>e.g. based on the Levenshtein distance.</div><div><br></div><div><br></div><div><br></div><div>please help me</div></div>                                               <br /><hr />Hotmail: Trusted email with Microsoft’s powerful SPAM protection. <a href='http://clk.atdmt.com/GBL/go/196390706/direct/01/' target='_new'>Sign up now.</a></body>
</html>