<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def encrypt(public, plaintext, output=None):
 """Encrypt a number with public key. The PLAINTEXT input will be interpreted as a floating point number. Output will be a JSON object with a "v" attribute containing the ciphertext as a string, and "e" the exponent as a Number, where possible fixed at -32. Note if you are passing a negative number to encrypt, you will need to include a "--" between the public key and your plaintext. """

    num = float(plaintext)

    log("Loading public key")
    publickeydata = json.load(public)
    pub = load_public_key(publickeydata)

    log("Encrypting: {:+.16f}".format(num))
    enc = pub.encrypt(num)
    serialised = serialise_encrypted(enc)
    print(serialised, file=output)