Given a list of HTTP status codes, count how many fall in each class: "1xx", "2xx", "3xx", "4xx" and "5xx". Always return all five keys. Ignore codes outside 100–599.
Implement status_classes. Input: codes: list[int]. Returns: dict[str, int].
def status_classes(codes: list[int]) -> dict[str, int]:
return {}
Run executes the public tests. Submit grades against public and hidden tests.
Given a list of HTTP status codes, count how many fall in each class: "1xx", "2xx", "3xx", "4xx" and "5xx". Always return all five keys. Ignore codes outside 100–599.
Implement status_classes. Input: codes: list[int]. Returns: dict[str, int].
def status_classes(codes: list[int]) -> dict[str, int]:
return {}
Run executes the public tests. Submit grades against public and hidden tests.