Question: (3) (10 points) There are many techniques for obfuscating text. One well-known technique replaces each letter with its +13' counterpart: original ABCDEFGHIJKLMNOPORSTUVWXYZ obfuscated NOPQRSTUVWXYZABCDEFGHIJKLM and
(3) (10 points) There are many techniques for obfuscating text. One well-known technique replaces each letter with its +13' counterpart: original ABCDEFGHIJKLMNOPORSTUVWXYZ obfuscated NOPQRSTUVWXYZABCDEFGHIJKLM and similarly for lower case: original abcdefghijkinnopqrstuvwxyz obfuscatednopqrstuvwxyzabcdefghijklm Thus, for example, the string Hello would become Uryyb. Write a Python function obfuscate(text) which applies the above transformation to all of the alphabetic characters in text and returns the result. You should use the functions ord(c) which translates a character c into a number (its ASCII equivalent), and chr(n) which translates an integer into a character (its ASCII equivaent). But: Only apply this transformation to alphabetic characters; other characters, such as spaces or digits, should be left unchanged You should use the modulo operator % in your function. Add a line to the bottom of your program which inputs a string from the user, applies the function obfuscate to it, and prints the result
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
