测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | FAIL |
| 代码长度 | 687 字符 |
模型生成的代码 (687 字符)
def start_withp(words_list):
"""
Given a list of strings where each string contains one or more words separated by spaces,
return a tuple of the first two words that start with the letter 'p' (case-insensitive).
"""
p_words = []
for phrase in words_list:
# Split each phrase into individual words
for word in phrase.split():
if word.lower().startswith('p'):
p_words.append(word)
# Stop as soon as we have two words
if len(p_words) == 2:
return tuple(p_words)
# If fewer than two words are found, return what we have (or handle as needed)
return tuple(p_words)
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
[[]]