In this line of code..
return number % 3
You do not have to return number % 3 ?
read the instruction
If/else statement is inside the function and you're calling
by_three() function inside function itself as if's condition ?...
Your if/else statement will never execute as your function halts code execution after it sees
return statement and runs it.
As function sees the return statement ,it halts its execution and takes execution out of the body of function without running any code after return and
never actually gets executed!
if by_three(number) == 0:
You have to check if number is divisible by 3 or not.
If I had to check if a number is divisible by 2 or not.
I'd write something like this..
(If condition is inside If -statement)
if number % 2 == 0:
here you have to check if number is divisible by 3?