In this challenge, establish if a given integer number is a Curzon number. If 1 plus 2 elevated to that number is exactly divisible by 1 plus 2 multiplied by number, then number is a Curzon number.
Here is the full code in Python.
In the first line we define the function then we test it for condition (% returns the remainder or signed remainder of a division after one number is divided by another that is why we check that it is 0).
If the condition is true then we return a positive answer otherwise we return a flase.
Comments
Post a Comment