Status Code
ABC 401Problem 15 of 50
EasyWhat to do
Given an HTTP status code (integer between 100–999), return 'Success' if it's between 200 and 299 (inclusive), or 'Failure' otherwise.
Key Concepts
if-statements
basic input/output
number comparison
Examples
Input:
s = 200
Output:
Success
Input:
s = 401
Output:
Failure
Tips for Beginners
- Focus on understanding the logic, not memorizing syntax
- Use print statements to debug your code
- Don't worry about input parsing - the function handles that for you
- If stuck, try writing out your solution on paper first
Python Editor
Loading Python...