Mbpp/410

⚠️ 仅 Base 通过 Base: PASS Plus: FAIL
测试评估
指标结果
Base 测试PASS
Plus 测试FAIL
代码长度563 字符
模型生成的代码 (563 字符)
def min_val(lst):
    """
    Find the minimum value among the numeric elements in a heterogeneous list.
    
    Args:
        lst: A list that may contain elements of various types.
    
    Returns:
        The minimum numeric value in the list.
    
    Raises:
        ValueError: If there are no numeric elements in the list.
    """
    # Filter out only numeric elements (int or float)
    numbers = [x for x in lst if isinstance(x, (int, float))]
    if not numbers:
        raise ValueError("No numeric values found in the list")
    return min(numbers)
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • [['Python', 10, 5, 2.5, 2.5, 'version']]