input: Write a function to encrypt a message using a key in Python. The function should take a message and a key as inputs and return the encrypted message. The encryption should be done by adding the ASCII value of each character in the message to the ASCII value of the first character of the key.
  
  assert encrypt("Hello world!", "secret")=="Tqxx{ yqx{|"
output: def encrypt(message, key):
      encrypted_message = ""
      key_char = ord(key[0])
      for char in message:
          encrypted_message += chr(ord(char) + key_char)
      return encrypted_message