def gender_survival_number(passenger_gender, titanic_data):
    """Returns the number of survivors for a given gender, M (male) or F (female)

    Your test case must test both genders
    """
    count = 0
    for i in range(len(titanic_data)):
        if (titanic_data[i]["gender"] == passenger_gender) and (titanic_data[i]["survived"] == "yes"):
            count += 1
    return count