input: Write a function to encrypt a message using a key in Python. The function should take two parameters: the message and the key. The encryption should be done by adding the ASCII value of the first character of the key to each character in the message, and then converting the result back to a character. Return the encrypted message.
  assert encrypt("Hello world!", "secret")=="Tqxxv#yqtnf\"
output: def encrypt(message, key):
      encrypted_message = ""
      key_value = ord(key[0])
      for char in message:
          encrypted_message += chr(ord(char) + key_value)
      return encrypted_message