The four bases found in DNA are adenine (A), cytosine (C), guanine (G) and thymine (T).

In genetics, GC-content is the percentage of Guanine (G) and Cytosine (C) bases on a DNA molecule that are either guanine or cytosine. 

Given a DNA sequence (a string) return the GC-content in percent, rounded up to 2 decimal digits for Python, not rounded in all other languages.

For more information about GC-content you can take a look to [wikipedia GC-content](https://en.wikipedia.org/wiki/GC-content).

**For example**: the GC-content of the following DNA sequence is 50%:
"AAATTTCCCGGG".

**Note**: You can take a look to my others bio-info kata [here](http://www.codewars.com/users/nbeck/authored)

Difficulty: introductory

Starter code:

def gc_content(seq):
	

Solutions:
def gc_content(seq):
    if not seq :
        return 0.0
    else:
        res = seq.count("C")+seq.count("G")
        return round(res*100/len(seq),2)


def gc_content(seq):
    if not seq:
        return 0
    gc_cnt = total_chars = 0
    for a in seq:
        if a in 'GC':
            gc_cnt += 1
        total_chars += 1
    return round(100.0 * gc_cnt / total_chars, 2)

def gc_content(seq):
    return round(sum(c in 'GC' for c in seq) / len(seq) * 100, 2) if len(seq) else 0.0

def gc_content(seq):
    return 0.0 if not seq else round((seq.count('G') + seq.count('C'))/float(len(seq)) * 100, 2)

def gc_content(seq):
    return bool(seq) and round(100 * (seq.count('C') + seq.count('G')) / len(seq), 2)

def gc_content(seq):
    return round(100 * (seq.count("G") + seq.count("C")) / len(seq), 2) if seq else 0

def gc_content(seq):
    try:
        result = ((seq.count("G") + seq.count("C")) / len(seq)) * 100
        result = round(result, 2)
        return result
    except ZeroDivisionError:
        return 0.0

from collections import Counter


def gc_content(seq):
    c = Counter(seq)
    return round(((c['C'] + c['G']) / len(seq)) * 100, 2) if seq else 0

def gc_content(seq):
    return round(100 * sum(x in 'GC' for x in seq) / (len(seq) or 1), 2)