function isNum added
pedirNumVariables y pedirValorK