def num_zeros_end(num):

    """
    Counts the number of zeros at the end
    of the number 'num'.
    """
    
    iszero = True
    num_zeros = 0
    i = len(num)-1
    
    while (iszero == True) and (i != 0):
         
        if num[i] == "0":
            num_zeros += 1
             
        elif num[i] != "0":
            iszero = False
          
        i -= 1    
                
    return num_zeros