Mbpp/737

✅ 完美通过 Base: PASS Plus: PASS
测试评估
指标结果
Base 测试PASS
Plus 测试PASS
代码长度481 字符
模型生成的代码 (481 字符)
import re
def check_str(s: str) -> bool:
    """
    Check if the given string starts with a vowel (a, e, i, o, u), case-insensitive, using regex.
    
    Args:
        s: Input string.
        
    Returns:
        True if s starts with a vowel, False otherwise.
    """
    # Pattern matches start of string followed by a vowel (lowercase or uppercase)
    pattern = r'^[aeiouAEIOU]'
    # re.match searches from the beginning of the string
    return bool(re.match(pattern, s))
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • 无失败测试