How do you make a function repeat itself using a while statement.
Here's the function:
# the function accepts any positive integer parameter and returns the sum of
# the squares of its digits.
def zap(intNum):
total = 0
while intNum != 0:
last = intNum % 10
total += last**2
intNum = intNum / 10
return total