测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | PASS |
| 代码长度 | 333 字符 |
模型生成的代码 (333 字符)
def odd_position(nums):
"""
Returns True if every odd index in the list contains an odd number,
False otherwise. Indices are 0-based.
"""
# Iterate over odd indices: 1, 3, 5, ...
for i in range(1, len(nums), 2):
if nums[i] % 2 == 0: # Even number at odd index
return False
return True
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
- 无失败测试