# compute average word length
line = input('Type a sentence: ')
words = line.split()
total = 0
print(words)
for x in words:
  total += len(x)
print('Average length:', total/len(words)) # total / number of words
