测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | PASS |
| 代码长度 | 584 字符 |
模型生成的代码 (584 字符)
def div_list(list1, list2):
"""
Divide two lists element-wise.
Args:
list1 (list of numbers): The dividend list.
list2 (list of numbers): The divisor list.
Returns:
list of float: A new list containing the element-wise quotients.
Raises:
ValueError: If the input lists have different lengths.
ZeroDivisionError: If any element in list2 is zero.
"""
if len(list1) != len(list2):
raise ValueError("Lists must have the same length for element-wise division.")
return [a / b for a, b in zip(list1, list2)]
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
- 无失败测试