Make the function work

Report a typo

Wow! This problem is kind of tricky. If you're ready to put your thinking cap on, brace yourself and good luck! Otherwise, you can skip it for now and return any time later!

The function closest_higher_mod_5 takes exactly one integer argument x and returns the smallest integer y such that:

  • y is greater than or equal to x,
  • y is divisible by 5.

Correct the last line of the code below to make the function work.

Tip: Try to think about how the variable remainder might be useful to you.

Sample Input 1:

40

Sample Output 1:

40

Sample Input 2:

43

Sample Output 2:

45
Write a program in Python 3
def closest_higher_mod_5(x):
remainder = x % 5
if remainder == 0:
return x
return "I don't know :("
___

Create a free account to access the full topic