← Back to challenges

Fraction Greater Than One

PythonMediumlanguage_fundamentalsstringsvalidationmath

Instructions

Given a fraction as a string, return whether or not it is greater than 1 when evaluated.

Examples

greater_than_one("1/2") ➞ False

greater_than_one("7/4") ➞ True

greater_than_one("10/10") ➞ False

Notes

Fractions must be strictly greater than 1 (see example #3).

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Find Out the Leap Year