input: Write a function to encrypt a message using a key in Python. The function should take two arguments, the message and the key, and return the encrypted message. The encryption process involves adding the ASCII value of each character in the message to the ASCII value of the first character of the key, and then converting the result back to a character.
  
  def encrypt(message, key):
      encrypted_msg = ""
      for char in message:
          encrypted_msg += chr(ord(char) + ord(key[0]))
      return encrypted_msg
  
  assert encrypt("Hello world!", "secret")=="Khoor#zruog$"
  assert encrypt("Python", "key")=="Sl{wrq"
  assert encrypt("Encryption", "secret")=="H{oenlqwoj"
  assert encrypt("Test", "")=="Test"
  assert encrypt("", "key")==""
output: def encrypt(message, key):
      encrypted_msg = ""
      for char in message:
          encrypted_msg += chr(ord(char) + ord(key[0]))
      return encrypted_msg