← Back to challenges

Check if an Integer is Divisible By Five

PythonMediumnumbersmathvalidation

Instructions

Create a function that returns True if an integer is evenly divisible by 5, and False otherwise.

Examples

divisible_by_five(5) ➞ True

divisible_by_five(-55) ➞ True

divisible_by_five(37) ➞ False

Notes

  • Don't forget to return the result.
  • If you get stuck on a challenge, find help in the Resources tab.
  • If you're really stuck, unlock solutions in the Solutions tab.
python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Get the Sum of All List Elements