Page 1 of 1

This is one full question. Please write in Python.

Posted: Tue Apr 12, 2022 10:23 am
by answerhappygod
This is one full question. Please write in Python.
This Is One Full Question Please Write In Python 1
This Is One Full Question Please Write In Python 1 (228.68 KiB) Viewed 29 times
(b) (4 points) Within ciphers.py, write a function swap_decrypt(ciphertext, keyword) that returns the plaintext from applying the transposition cipher described above to de- crypt ciphertext using keyword. You may assume that both ciphertext and keyword are non-empty. Clean up both the ciphertext and keyword parameters by calling your previously written cleanup_text() function before proceeding. Call your previously written swap() function as needed. Do not call any built-in Python functions except len(), ord(), and range () in your solution. Here are some example arguments for this function and their expected return values: Arguments Return Value ('LSOTH', SLOTH' ('sloth', 'aa') SLOTH' RLOTPOHWES', 'top') 'SLOTHPOWER' 'a') 5. (8 points) Below your function definitions in ciphers.py, write a program that tests all five of your functions. Each test case should include specific arguments to the function and show the function's return value for those arguments. Include at least three test cases per function you can choose some from the examples given on this lab, and/or make up your own. No user input is needed.