def happy(num):
while len(str(num))>1:
finding=hfind(num)
if finding==1:
print("True")
else:
print("false")
def hfind(num):
total=0
for i in str(num):
total+=int(i)*2
num=total
return(num)
happy(100)
I wrote code for Happy Number but,i don't know why it is not printing any output.
Can anybody explain clearly especially using this problem.