def dotprod(K,L):
    """dot product of two lists
    Parameters :
        K(Iterable):- a numerical list
        L(Iterable):- a numerical list
    Return ;
        p(float):- dot product of K and L
    """
    if(len(K) == len(L)):
        try:
            return(sum([x*y for x,y in zip(K,L)]) )
        except ValueError:
            print('elements of K and L are not all numeric')
            exit()
    else:
        print("K and L are not of the same length")