🔎 CRUXEval Sample Explorer 🔎

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


   
def f(arr):
    result = []
    for item in arr:
        try:
            if item.isnumeric():
                result.append(int(item)*2)
        except ValueError:
            result.append(item[::-1])
    return result
assert f(['91', '16', '6r', '5r', 'egr', '', 'f', 'q1f', '-2']) == [182, 32]
CRUXEval-I
assert f(??) == [182, 32]

CRUXEval-O
assert f(['91', '16', '6r', '5r', 'egr', '', 'f', 'q1f', '-2']) == ??