Skip to content

Commit

Permalink
Merge pull request #44 from aprilsanchez/patch-13
Browse files Browse the repository at this point in the history
Clarify directions for simpleEncode()
  • Loading branch information
ykharitonova authored Feb 14, 2020
2 parents ea9cc50 + e4510ce commit 3ff2c3c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions _lab/lab05.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ You can now update the above pseudocode with the additional checks that are list
def simpleEncode(plaintext, alphabet, cipher):
"""
Given plaintext to encode,
an alphabet and a cipher, return the
encoded ciphertext.
an alphabet and a cipher alphabet, return
the encoded ciphertext.
If the lengths of the alphabet and
cipher are not the same, return -1.
If a character from plaintext is not
Expand All @@ -270,17 +270,17 @@ Now that we have successfully converted our plaintext into a gibberish ciphertex
def simpleDecode(ciphertext, alphabet, cipher):
"""
Given ciphertext to decode,
an alphabet and a cipher, return the
decoded plaintext.
an alphabet and a cipher alphabet, return
the decoded plaintext.
If the lengths of the alphabet and
cipher are not the same, return -1.
If a character from ciphertext is not
found in the alphabet, return None.
found in the cipher alphabet, return None.
"""
return "stub"
```

You should be able to run `simpleDecode("yx", createAlphabet(), createCipher(createAlphabet()))` and get back the original string "hi" that you encoded above.
You should be able to run `simpleDecode("yx", createAlphabet(), createCipher(createAlphabet()))` and get back the original string "HI" that you encoded above.


See if you can decode this message from your mentors:
Expand Down

0 comments on commit 3ff2c3c

Please sign in to comment.