def categorical(responses):
    """Analyses categorical responses

    Args:
        responses(list/tuple): List/tuple of the responses
            For example: ["Yes","No","Yes"] or ("Yes","No","Yes")

    Returns:
        A dictionary containing the sorted percentages of each response.
        For example:
        {"Percentages": {"No": 0.3333333333333333, "Yes": 0.6666666666666666}}
    """
    categories = {}
    for i in responses:
        if i not in categories.keys():
            categories[i] = 1
        else:
            categories[i] += 1

    for category, freq in categories.items():
        categories[category] = freq / len(responses)
    sorting = sorted(categories.items(), key=lambda x: x[1])
    return {"Percentages": dict(sorting)}