Run Details #713

Score

0

Correct (≥100)

0/1

Incorrect (<100)

1

Median Time

2522.0ms

Tokens Used

296

Cost

126µ$

Run Date: 2026-03-03 00:03:32
Coding question results (1)
0303_python_letter_count:0 Incorrect
Score: 0 • 2522ms • 296 tokens • 126µ$
Question: Write Python 3.12 code only. Define exactly one function named count_target_letter(text, target). Return how many times the target letter appears in the string. Count should be case-insensitive. Raise TypeError for non-string input, and raise ValueError if target is not exactly one character. Do not use any imports (no numpy, requests, or other libraries). Sandbox note: dunder attribute access is blocked (for example, type(x).__name__). Avoid names/attributes starting with '__'. Expected output format: - Return exactly one fenced Markdown code block starting with ```python and ending with ```. - Put only valid Python code inside that block (no prose before/after). - Use 4 spaces for indentation (not tabs). - Do not return JSON and do not wrap code in a "function" key. Sample input/output behavior: - count_target_letter("Mississippi", "s") -> 4 Task: Write a Python 3.12 function for 'how many times does the target letter appear in a string'.
Submitted code
def count_target_letter(text, target):
    return len(text.lower().count(target))
```
Test case results
# Status Args Expected Actual Error
0 Fail - - - SyntaxError: invalid syntax