Parse a Bounded Integer Setting

Convert value into an integer using int(). Return it only when minimum <= number <= maximum; otherwise return None. Catch TypeError and ValueError for invalid values. Return None if minimum exceeds maximum. Values are strings or None and bounds are integers.

Difficulty: beginner

Examples

  • [" 12 ",1,20]12

Your solution

Python

Results

Python starts when you run or submit this challenge.

Back to Lesson