ComputeAverageLengthOfWords
Escriba una función 'computeAverageLengthOfWords' que recibe dos strings y devuelve el promedio de la longitud de ambos strings.
- Crear la funcion "computeAverageLengthOfWords"
- "computeAverageLengthOfWords" tiene que recibir dos argumentos, ambos de tipo string
- Averiguar cuantos caracteres tiene cada string a traves de 'length'
- Como pide el promedio, sumar el numero de caracteres de ambas strings y lo almacenar en la variable sum
- Declarar la variable prom, que consiste en dividir entre dos el resultado de sum
- Retornar el resultado de prom
- A continuacion se llama a la funcion dentro de la variable output
- Se introducen los argumentos deseados
- Imprime en la consola el resultado
English
Write a function called "computeAverageLengthOfWords". Given two words, "computeAverageLengthOfWords" returns the average of their lengths.
- Create a function named "computeAverageLengthOfWords"
- "computeAverageLengthOfWords" needs two string arguments
- Find how long is every string with 'length'
- Add the number of characters of both strings and save it on 'output'
- Introduce arguments
- Print result in console