def prompt_for_role(roles):
    """Ask user which role to assume."""
    if len(roles) == 1:
        return roles[0]
    print('Please select a role:')
    count = 1
    for role in roles:
        print('  {count}) {role}'.format(count=count, role=role[0]))
        count = count + 1
    choice = 0
    while choice < 1 or choice > len(roles) + 1:
        try:
            choice = int(input('Choice: '))
        except ValueError:
            choice = 0
    return roles[choice - 1]
