测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | PASS |
| 代码长度 | 342 字符 |
模型生成的代码 (342 字符)
def sum_even_and_even_index(lst):
"""
Returns the sum of even numbers that are located at even indices (0-based)
in the given list.
"""
total = 0
for i, num in enumerate(lst):
# Check for even index (0, 2, 4, ...) and even value
if i % 2 == 0 and num % 2 == 0:
total += num
return total
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
- 无失败测试