Create a function that compares two words based on the sum of their ASCII codes and returns the word with the smaller ASCII sum.
ascii_compare("hey", "man") ➞ "man"
# ["h", "e", "y"] ➞ sum([104, 101, 121]) ➞ 326
# ["m", "a", "n"] ➞ sum([109, 97, 110]) ➞ 316
ascii_compare("majorly", "then") ➞ "then"
ascii_compare("victory", "careless") ➞ "victory"
- Both words will have strictly different ASCII sums.
- You can get the ASCII code for a single character using the
ord
function.