Thank you for your comments. The kata concerns Harshad numbers which are integers divisible by the sum of their digits - so 0 is not Harshad as 0 divided by 0 is undefined. My test solution would return False if testing zero.
However, to clarify the kata I have modified the desciption to consider only the positive integers - so the test case for zero is no longer required.
Hello, On submitting my code, I obtain the response 1234567098 should equal 1234567908 from the online tester. Should it not return 1234567890? Thanks.
I've just approved it.
Thanks :)
I've just approved it. Thanks.
Oh dear, I had'nt appreciated that there was a convention. Many thanks.
Thank you for your comments. The kata concerns Harshad numbers which are integers divisible by the sum of their digits - so 0 is not Harshad as 0 divided by 0 is undefined. My test solution would return False if testing zero.
However, to clarify the kata I have modified the desciption to consider only the positive integers - so the test case for zero is no longer required.
Hello, On submitting my code, I obtain the response 1234567098 should equal 1234567908 from the online tester. Should it not return 1234567890? Thanks.