🔎 CRUXEval Sample Explorer 🔎

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


   
def f(text, lower, upper):
    count = 0
    new_text = list()
    for char in text:
        char = lower if char.isdecimal() else upper
        if char in ['p', 'C']:
            count += 1
        new_text.append(char)
    return count, ''.join(new_text)
assert f('DSUWeqExTQdCMGpqur', 'a', 'x') == (0, 'xxxxxxxxxxxxxxxxxx')
CRUXEval-I
assert f(??) == (0, 'xxxxxxxxxxxxxxxxxx')

CRUXEval-O
assert f('DSUWeqExTQdCMGpqur', 'a', 'x') == ??