GoalScope — is_undulating (Qwen2.5-Coder-32B-Instruct) — hover a token to see the patched verbalization
↵
<code>↵
def is_undulating(n):↵
"""Check if a number is undulating."""↵
s = str(n)↵
l = len(s)↵
if l < 3 or l % 2 == 0:↵
return False↵
for i in range(1, l - 1, 2):↵
if s[i] != s[0] or s[i + 1] != s[-1]:↵
return False↵
return True↵
</code>