Question: 1 . Cyphertext: Encode and Decode 1 . 1 Recall that in Practice Exercises you implemented a cypher text generator, which encrypts a string by
Cyphertext: Encode and Decode
Recall that in Practice Exercises you implemented a cypher text generator, which encrypts a
string by switching every letter at alphabetical position i with the uppercase letter at alphabetical
position i
In this assignment, you are asked to reimplement it using a function:
Function: cyphers
Input: s a string object
Return: the cypher text corresponding to s
Save the file in pspy Test your function by passing it with a meaningful sentence.
Test your function again by passing the string returned by the function from the previous test.
Did you notice that the function can encode as well as decode? Explain why. Use your program
to decode the following: VEVIBLMV HSLFOW GZPV NRHG What does it say?
You notice that digits are not encrypted. Improve your program so that any digit at position i
in digits is replaced with the digit at i Save the improved program in psipy What is
the encrypted value of
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
