def num_diffs(state):
    """
    Takes a state and returns the number of differences between
    adjacent entries.

    num_diffs(str) -> int
    """
    differences = 0
    for i in range(0, len(state) - 1):
        if state[i] != state[i+1]:
            differences += 1
    return differences