Skip to content

Ejercicio computeAverageLengthOfWord del Reto de Códigos de Laboratoria 5a Gen

Notifications You must be signed in to change notification settings

denimux/reto_compute_average_length_of_word

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

ComputeAverageLengthOfWords

Escriba una función 'computeAverageLengthOfWords' que recibe dos strings y devuelve el promedio de la longitud de ambos strings.

  1. Crear la funcion "computeAverageLengthOfWords"
  2. "computeAverageLengthOfWords" tiene que recibir dos argumentos, ambos de tipo string
  3. Averiguar cuantos caracteres tiene cada string a traves de 'length'
  4. Como pide el promedio, sumar el numero de caracteres de ambas strings y lo almacenar en la variable sum
  5. Declarar la variable prom, que consiste en dividir entre dos el resultado de sum
  6. Retornar el resultado de prom
  7. A continuacion se llama a la funcion dentro de la variable output
  8. Se introducen los argumentos deseados
  9. Imprime en la consola el resultado

English

Write a function called "computeAverageLengthOfWords". Given two words, "computeAverageLengthOfWords" returns the average of their lengths.

  1. Create a function named "computeAverageLengthOfWords"
  2. "computeAverageLengthOfWords" needs two string arguments
  3. Find how long is every string with 'length'
  4. Add the number of characters of both strings and save it on 'output'
  5. Introduce arguments
  6. Print result in console

About

Ejercicio computeAverageLengthOfWord del Reto de Códigos de Laboratoria 5a Gen

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages