def test_results_to_score(test_results, verbose=True):
    """Calculate a score from 0-100 based on number of failed/total tests"""
    tests_failed, tests_total = test_results
    tests_passed = tests_total - tests_failed
    score = int(100 * tests_passed / tests_total)
    if verbose:
        print("Score: %d/100" % score)
    return score