Main.Assignment7 History

Hide minor edits - Show changes to markup

April 30, 2013, at 05:49 PM MST by 24.54.128.180 -
Changed lines 3-15 from:

Due date: 3/22/10

Recursive multiplication

Write a function mult(x, y) that recursively computes the value of x * y, where x and y are integers, without using multiplication, or any loop construct. Your function should be able to handle negative numbers as well.

Put the function in a file called multiply.py and have your program ask the user for two integers. If the input provided by the user are not integers, your program should raise an exception.

Recursive counting

Write a function count(s, char) that counts the number of times the character char occurs in the string s. Do it using recursion without any loop construct.

Put the function in a file called count_char.py.

to:

Due date: 5/13/13

Detecting and visualizing CpG islands

The CG di-nucleotide is a lot less common in vertebrate genomes than would be expected by chance, with the exception of regions called CpG islands, which tend to occur in promotors (wikipedia has a good article on the topic). Write a function that detects high CG content in a window of size around 500 bp in a genome of interest and plots the CG content in a region surrounding the detected region.

Submit your code, along with the resulting plots via ramct. Please use human chromosome 18 for your analysis, which you can download from from the UCSC genome website.

March 07, 2010, at 09:08 PM MST by 71.196.160.210 -
Added lines 8-15:

Put the function in a file called multiply.py and have your program ask the user for two integers. If the input provided by the user are not integers, your program should raise an exception.

Recursive counting

Write a function count(s, char) that counts the number of times the character char occurs in the string s. Do it using recursion without any loop construct.

Put the function in a file called count_char.py.

March 07, 2010, at 08:32 PM MST by 71.196.160.210 -
Added lines 3-4:

Due date: 3/22/10

Changed lines 7-8 from:

Write a function mult(x, y) that recursively computes the value of x * y, where x and y are integers, without using multiplication, or any loop construct. Your function should be able to handle negative numbers as well.

to:

Write a function mult(x, y) that recursively computes the value of x * y, where x and y are integers, without using multiplication, or any loop construct. Your function should be able to handle negative numbers as well.

March 07, 2010, at 08:23 PM MST by 71.196.160.210 -
Added lines 1-5:

Assignment 7

Recursive multiplication

Write a function mult(x, y) that recursively computes the value of x * y, where x and y are integers, without using multiplication, or any loop construct. Your function should be able to handle negative numbers as well.