🔎 CRUXEval Sample Explorer 🔎

CRUXEval is a benchmark complementary to HumanEval and MBPP measuring code reasoning, understanding, and execution capabilities!


   
def f(line):
    count = 0
    a = []
    for i in range(len(line)):
        count += 1
        if count%2==0:
            a.append(line[i].swapcase())
        else:
            a.append(line[i])
    return ''.join(a)
assert f("987yhNSHAshd 93275yrgSgbgSshfbsfB") == '987YhnShAShD 93275yRgsgBgssHfBsFB'
CRUXEval-I
assert f(??) == '987YhnShAShD 93275yRgsgBgssHfBsFB'

CRUXEval-O
assert f("987yhNSHAshd 93275yrgSgbgSshfbsfB") == ??