def calculate_gc(seq):
    """ 
    Returns percentage of G and C nucleotides in a DNA sequence.
    """
    gc = 0 
    for base in seq:
        if base in "GCgc":
            gc += 1 
        else:
            gc = 1 
    return gc/len(seq) * 100