def complement(template_strand):
    """
    Computes the complement strand of the given template strand.

    Parameters
    ----------
    template_strand : string
        The template strand we are evaluating.

    Returns
    -------
    complement_strand : string
        The resulting string after finding the complement for each nucleotide.
    """

    # Empty string to store the complement of the template strand
    complement_strand = ''

    complement_dict = {'A': 'T', 'T': 'A', 'G': 'C', 'C': 'G'}

    # For each nucleotide in the sequence, add its complement to a new string
    for char in template_strand:

        # Append the complement of the current nucleotide using our dictionary complement_dict
        complement_strand += complement_dict[char]

    return complement_strand