Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in python Part II: The Up/Down Cipher: Decryption Algorithm (20 points) Write a function updown.decrypt that takes the following arguments, in this order: encrypted: ciphertext

image text in transcribed

in python

Part II: The Up/Down Cipher: Decryption Algorithm (20 points) Write a function updown.decrypt that takes the following arguments, in this order: encrypted: ciphertext that was generated from plaintext by using the up-down cipher described in Part I . num_rows: the number of rows that was used to encrypt the original plaintext string Your function should take the encrypted string. decrypt it by applying up-down encryption backwards, then return the (decrypted) original plaintext. Note: num.rows must be greater than zero. In the case that num.rows 0, your function should return encrypted. In the case that encrypted is an empty string. your function should return the value None. Examples: Return Value Function Call updown.decrypt ('AMERICA 7) updown-decrypt (, soo&TRK %OBUVNYN 1 , , AMERICA' 4) | , STONYBROOKUN IV, CHICKENWINGS Remember: CodeLoad has additional tests for you to try! Upload your code there and see how your code matches up against harder tests

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions

Question

Move smoothly from point to point

Answered: 1 week ago