input: Write a function to encrypt a message using a key in Python. The function should take two parameters, the message and the key, and return the encrypted message. The encryption should be done by adding the ASCII value of the first character of the key to the ASCII value of each character of the message.
  assert encrypt("Hello world!", "secret")=="Tqxxa iadxp!"
  assert encrypt("Python is awesome", "key")=="[rgzqe nl@_ilf{eq_"
  assert encrypt("Hello", "abc")=="Khoor"
  assert encrypt("Cryptography", "xyz")=="Fuxwtrlwfkxb"
  assert encrypt("", "key")==""
output: def encrypt(message, key):
      encrypted_message = ""
      key_ascii = ord(key[0])
      for char in message:
          if char.isalpha():
              new_char = chr(ord(char) + key_ascii)
              if char.islower() and new_char > 'z':
                  new_char = chr(ord(new_char) - 26)
              elif char.isupper() and new_char > 'Z':
                  new_char = chr(ord(new_char) - 26)
              encrypted_message += new_char
          else:
              encrypted_message += char
      return encrypted_message