Answered step by step
Verified Expert Solution
Question
1 Approved Answer
https: piazza resources.s3.amazonaws.com 4goftaoyx07mi/93e5q6qknw36q/CSE101-homework4.pdf?AWSAccessKeyld-AKI AIEDNRLJ4AZKBW6H Google Docs Secure ::: Apps -Photos and Videos CSE 101 (Section 0 M FM Student Servic Modern Family: Se
https: piazza resources.s3.amazonaws.com 4goftaoyx07mi/93e5q6qknw36q/CSE101-homework4.pdf?AWSAccessKeyld-AKI AIEDNRLJ4AZKBW6H Google Docs Secure ::: Apps -Photos and Videos CSE 101 (Section 0 M FM Student Servic " Modern Family: Se repositorystclouds R 0 Notifications CSE101_homework4.pdf 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: Function Call updown.decrypt'AMERICA', 7) updown-decrypt('SO0%TRK%OBUVNYNI, , updown.decrypt 'CHICKENWINGS',-2) Return Value 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. homework4(7).zip -homework4 (6).zip CSE101 pdf Show All
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started