Pregunta de entrevista de Ladders

Write a function that, given a string of words, returns the average word length.