input: 
  def encrypt(message: str, key: str) -> str:
      """Encrypts a message using a key by shifting each character in the message
      by the ASCII value of the first character of the key.
      >>> encrypt("Hello world!", "secret")
      'Tqxx{ yx}q&'
      """
  
output:     encrypted_message = ""
      shift = ord(key[0])
      for char in message:
          if char.isalpha():
              base = ord('A') if char.isupper() else ord('a')
              encrypted_char = chr((ord(char) - base + shift) % 26 + base)
          else:
              encrypted_char = char
          encrypted_message += encrypted_char
      return encrypted_message