Each character in the English Alphabet has an ASCII Char Code.
Create a function that converts any word in a given sentence to upper case if the sum of the ASCII codes of the letters in the word is greater than the global average for the sentence. The global average of a sentence is the sum of all the word values divided by the number of words.
For example:
| Word | Tell | me | the | time |
|---|---|---|---|---|
| Sum | 401 | 210 | 321 | 431 |
Since on average, a word in this sentence has a char code sum of 340.75, "Tell" & "time" would be returned capitalised: "TELL me the TIME"
average_ascii("Tell me the time") ➞ "TELL me the TIME"
# Global Average for char code sum of a word is 340.75
average_ascii("To be or not to be") ➞ "To be or NOT to be"
# Global Average for char code sum of a word is 230.33
average_ascii("Innokodakademija helps you learn in bitesize chunks") ➞ "INNOKODAKADEMIJA HELPS you learn in BITESIZE CHUNKS"
# Global Average for char code sum of a word is 533.43