Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(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

image text in transcribed
(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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions