Corrected Silly Errors

This commit is contained in:
Cutieguwu
2024-04-11 11:39:33 -04:00
parent fb1f597105
commit f882b00287

View File

@@ -15,7 +15,7 @@
# @Last Modified by: Cutieguwu | Olivia Brooks
# ----------------------------------------------------------
def decrypt(dataEncoded: str, key: str):
def decrypt(dataEncoded: str, keyDecrypt: str):
"""
Decrypts a string encoded using a substitution cypher based on the provided key.\n
Characters closer to index 0 in `key` are more common in the English language.
@@ -23,9 +23,7 @@ def decrypt(dataEncoded: str, key: str):
dataDecrypted = ""
# Convert key to a list.
keyDecrypt = [].append(k for k in key)
keyEnglish = [].append(k for k in "etaoinshrdlcumwfgypbvkjxqz") # Lewand's order of english characters; most to least common.
keyEnglish = "etaoinshrdlcumwfgypbvkjxqz" # Lewand's order of english characters; most to least common.
for c in dataEncoded:
is_found = False
@@ -38,3 +36,5 @@ def decrypt(dataEncoded: str, key: str):
return dataDecrypted
print(decrypt("asdafhedjwandseifhbjnwj", "qwertyuiopasdfghjklzxcvbnm"))