Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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