Check Divisible By 5
Beginner
Let's help you create a cool function that tells if a number is divisible by 5. This is a great way to practice controlling conditions using simple math!
Task
Write a function named check_divisible_by_5. This function should take a single integer as an argument and return True if the integer is divisible by 5, otherwise it should return False.
Example
Here are some examples to illustrate what your function should do:
check_divisible_by_5(10) # Output: True, because 10 / 5 = 2 check_divisible_by_5(7) # Output: False, because 7 is not divisible by 5 check_divisible_by_5(20) # Output: True, because 20 / 5 = 4 check_divisible_by_5(3) # Output: False, because 3 is not divisible by 5
Hint:
In Python, you can use the modulus operator % to check the remainder of a division. If number % 5 is 0, then your number is divisible by 5.
Inputs
Arg 1:
10Expected Output
trueActual Output