please code in python.
Each problem will be placed in its own function. You will have a main function that calls the function for each problem. For these problems, you will need to use the following string functions: lower, upper, isupper, islower, isdigit, and replace, along with using [ ] to access individual characters. You may use other string functions if you find them useful.
You will write a function named computeGCPercentage that accepts a string (representing a piece of DNA) as an input and returns a float representing the Guanine-Cytosine (GC) content percentage.
For example, assume that the DNA string GTAACTAGCTTACGTAAC is entered. Because there are a total of 7 characters that are either G or C, and there are 18 characters altogether, the function should return a floating point value equivalent to 7/18 .
Requirements Your function:
1. Must check to see that there are no other characters in the string other than those specified. If there is, it should print an error message and return 0.
2. Must check to make sure that the string actually has characters. If it is a zero-length string, return 0.
3. Must work correctly for both upper-case, lower-case, and mixed-case strings.
Extracted text: Background: In molecular biology, DNA molecules are made of a number of different nitrogenous bases. This includes adenine (A), guanine (G), thymine (T), and cytosine (C). The letter abbreviations in the previous sentence are used to denote the composition of a DNA molecule. For example, you might have the string TTGATCA. The Guanine-Cytosine (GC) content percentage is a simple statistic that can be used for describing genomes. It is simply the ratio of the occurrences of G and C in the sequence to the number of bases present. That is: G+C A+T+G+ C . where the letters above represent the counts of those bases in the string representing the DNA.