Skip to content
C

Status Code Classifier

Easypython

Write a function that classifies an HTTP status code into its category — Informational, Success, Redirection, Client Error, or Server Error — based on its numeric range.

What the problem means: every HTTP status code falls into one of five ranges (1xx-5xx); this checks you understand what each range means, independent of any specific request.

Approach: compare the code against the five ranges from the notes (1xx, 2xx, 3xx, 4xx, 5xx) and return the matching category name.

Input: One line: a 3-digit HTTP status code.

Output: One line: Informational, Success, Redirection, Client Error, or Server Error.

Input (stdin)

Output

Run your code to see output here...