[Solved] programing function in python
I changed 2 things : while n > 1: instead of while n > 0: otherwise your loop never stops n=n//10 instead of n=n/10, where // is the euclidian division, which is what you need here You should try this : def testD(D,n): if D % 2 == 0: return 0 count = 0 while … Read more