input: Write a function to encrypt a message using a key in Python. The function should take two parameters: the message to be encrypted and the encryption key. The encryption process involves converting each character in the message by adding the ASCII value of the first character of the key to the ASCII value of the character in the message. Return the encrypted message as a string.
  assert encrypt("Hello world!", "secret")=="Ifmmp!xpsme"
  assert encrypt("Python", "key")=="][{cpo"
  assert encrypt("Encrypt", "abc")=="Fohdugif"
  assert encrypt("Test", "123")=="Uftu"
  assert encrypt("", "key")==""
output: def encrypt(message, key):
      encrypted_message = ""
      key_ascii = ord(key[0])
      for char in message:
          encrypted_message += chr(ord(char) + key_ascii)
      return encrypted_message