def offbyK(s1,s2,k):
    """Input: two strings s1,s2, integer k
    Process: if both strings are of same length, the function checks if the
    number of dissimilar characters is less than or equal to k
    Output: returns True when conditions are met otherwise False is returned"""
    if len(s1)==len(s2):
        flag=0
        for i in range(len(s1)):
            if s1[i]!=s2[i]:
                flag=flag+1
        if flag==k:
            return True
        else:
            return False
    else:
        return False