The hash_text function will consume a string (any kind of message) and two integers (base and hash_size), and produces an integer that attempts to uniquely represent the text.

  1. Convert the string to a list of integers using ord.
  2. Transform each integer of the list using the following formula: new value = (index + base) ** (old value). Hint: to get the index, you can use the Count pattern or the built-in enumerate function.
  3. Sum the list of integers.
  4. Use the modulo operator (%) to limit the total value to hash_size.