Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Python Problem 1. Write a function with the following description: def encxyntionlS, n): input: A string S consisting of only lower case letters and empty
Python
Problem 1. Write a function with the following description: def encxyntionlS, n): input: A string S consisting of only lower case letters and empty spaces of arbitrary length. n, an integer; output: A stringW-Tst:(n). T is a string which has been encrypted by replacing each letter in the string S by a letter n letters ahead in the alphabet. For example, ensryption.l"hello", returns "ifmmp xpsmel, that is, each letter has been replaced by remains unchanged. return helloo one letter ahead of it. Empty space character Note that the alphabet shifting is circular. Shifting z by 1 letter gives a. Problem 2. Write a function with the follwoing description: def decryption (W) input: A string W, encrypted as described in Problem 1; output: Based on the trailing integer in W, return the original content of the string S. For example, desryption.l"ifmme xpsmel") returns "hello worldStep 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