This is one full question. Please write in Python.

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

This is one full question. Please write in Python.

Post 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 28 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.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply