Lab 1: Ciphers

 

 

Input transformations separated by semicolons according to the following syntax:

   

[splashscreen] enabled = false plugins = [ "https://pyscript.net/latest/plugins/python/py_tutor.py" ] [[fetch]] files = ["./cipher.py"] from pyscript import Element import cipher def encrypt(): # Get paragraph element by id paragraph = Element("output") inputval = Element("message_str").value transval = Element("trans_str").value # Add current time to the paragraph element paragraph.write("Encrypted Text:\n" + cipher.transform("E", inputval, transval)) def decrypt(): # Get paragraph element by id paragraph = Element("output") inputval = Element("message_str").value transval = Element("trans_str").value # Add current time to the paragraph element paragraph.write("Decrypted Text:\n" + cipher.transform("D", inputval, transval))