← Back to challenges

Fix the Expression

PythonMediumbugslanguage_fundamentalsvalidation

Instructions

Fix the code in the Code tab so the function returns true if and only if x is equal to 7. Try to debug code and pass all the tests.

Examples

is_seven(4) ➞ False

is_seven(9) ➞ False

is_seven(7) ➞ True

Notes

The bug can be hard to find, so look closely!

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Difference of Max and Min Numbers in List