input: Write a function to implement a simple encryption algorithm that XORs each character's ASCII value with a given key.
  assert encrypt("Hello World!", 10) == '^RPf#_sWr#G'
  assert encrypt("Python123", 5) == 'T{~hpi%676'
  assert encrypt("DataScience", 15) == 'KttlKzk`^jj'
output: def encrypt(text, key):
      return ''.join(chr(ord(char) ^ key) for char in text)