Question: Write a function encypher_L(String,char, shift), which encyphers a character, char, as follows: String is a string of non-repeating characters. Any letters in string are lowercase.

Write a function encypher_L(String,char, shift), which encyphers a character, char, as follows: String is a string of non-repeating characters. Any letters in string are lowercase. If the lowercase of char is not in String, char is not encyphered. If the lowercase of char is in String, it is encyphered by shifting its position in String by shift, wrapping around to the beginning of String if necessary. This produces a cypher_char. If char is a letter and cypher_char is a letter, cypher_char must match the case of char. Hints: use the s.lower() and char.isupper() string methods. Plan on calculating the length of String. Sample run: String = 'asdfghjkl;"12345nm,./' shift = 1 for char in 'Here is An example to encypher: 3/5 + 17.': print(char,encypher_L(String,char, shift)) H J e e r r e e i i s d A S n m e e x x a s m , p p l ; e e t t o o e e n m c c y y p p h j e e r r : : 3 4 / a 5 n + + 1 2 7 7 . / >>>

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!