Main.Assignment7 History
Hide minor edits - Show changes to markup
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.
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.
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.
Due date: 3/22/10
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.
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.
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.
