(person)
return curr_avg / len(photos)
SuccessRate is determined by Tinder for their 'Smart Photos' feature
SuccessRate is determined by Tinder for their 'Smart Photos' feature
SuccessRate is determined by Tinder for their Smart Photos feature
def get_avg_successRate(person):
    '''
    SuccessRate is determined by Tinder for their 'Smart Photos' feature
    '''
    photos = person['photos']
    curr_avg = 0
    for photo in photos:
        try:
            photo_successRate = photo['successRate']
            curr_avg += photo_successRate
        except:
            return -1
    return curr_avg / len(photos)
def get_avg_successRate ( person ) : photos = person [ 'photos' ] curr_avg = 0 for photo in photos : try : photo_successRate = photo [ 'successRate' ] curr_avg += photo_successRate except : return - 1 return curr_avg / len ( photos )