Archives for the ‘Python’ Category

Genetics with Python

The last problem in the first set of Software Carpentry goes like this: "9. In genetic cryptography, the four bases ACGT represent the digits 0123 in a base-4 numerical system, so CGA is (1*4^2)+(2*4)+0 = 20. Write a function dna2num(str) to convert a DNA string to a number, and another function num2dna(int) to convert an [...]