Programs for calculating effective temperature, radius, mass and luminosity of K and M dwarfs