Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Internet slang has entered (relatively) widespread usage, evolving from its roots as an obfuscation technique into a form of communication used principally to express dissatisfaction

image text in transcribed

Internet slang has entered (relatively) widespread usage, evolving from its roots as an obfuscation technique into a form of communication used principally to express dissatisfaction with the performance of a teammate or to caption photographs of domesticated animals. For this assignment, you will write a program for something resembling a 1337 (i.e., leetspeak) translator, that will receive a single sentence as a string argument and produce a string return value for the equivalent sentence in 1337. If you are not familiar with this "language", read more at https://en.wikipedia.org/wiki/Leet. For this assignment, you need to write a series of functions. Download (and rename) the "starting point for_assignment_5.py" file from cuLearn, and add the required functionality: Write a main function that prompts the user to type a string and then remove all punctuation marks and replace all lowercase letters with their uppercase equivalent (using calls to the functions described below that you will write). Display this text to the user and then ask... o ...if the user wants to replace phrases? o if the user wants to replace words? if the user wants to replace letters and, if so, what letters? Depending upon how the user responds to each question, you would then call some or all of the functions described below (that you will write), printing the result after each step. After printing the final result you must ask the user if they would like to translate another string and, if the answer is yes, loop back to the input prompt. (n.b. Do NOT call the main ) function again to achieve this repetition use a loop.) Write a function to replace at least four different phrases (of two or three words) with established acronyms (e.g, replace "BY THE WAY" with "BTW") of your choosing. This function must take only the string to be modified as an argument and must return the string with the replacements. You may not use any built-in find, replace, encode, or translate functions, butyou may write your own version of these functions if you wish, and you may use the indexing operator (i.e., the square brackets), the slicing operator (i.e., the colon), the "in" operator, and the lenO function. Type the string to be translated: By the way, can I have a cheeseburger? After replacing phrases BTW I CAN HAS CHEESEBURGER Internet slang has entered (relatively) widespread usage, evolving from its roots as an obfuscation technique into a form of communication used principally to express dissatisfaction with the performance of a teammate or to caption photographs of domesticated animals. For this assignment, you will write a program for something resembling a 1337 (i.e., leetspeak) translator, that will receive a single sentence as a string argument and produce a string return value for the equivalent sentence in 1337. If you are not familiar with this "language", read more at https://en.wikipedia.org/wiki/Leet. For this assignment, you need to write a series of functions. Download (and rename) the "starting point for_assignment_5.py" file from cuLearn, and add the required functionality: Write a main function that prompts the user to type a string and then remove all punctuation marks and replace all lowercase letters with their uppercase equivalent (using calls to the functions described below that you will write). Display this text to the user and then ask... o ...if the user wants to replace phrases? o if the user wants to replace words? if the user wants to replace letters and, if so, what letters? Depending upon how the user responds to each question, you would then call some or all of the functions described below (that you will write), printing the result after each step. After printing the final result you must ask the user if they would like to translate another string and, if the answer is yes, loop back to the input prompt. (n.b. Do NOT call the main ) function again to achieve this repetition use a loop.) Write a function to replace at least four different phrases (of two or three words) with established acronyms (e.g, replace "BY THE WAY" with "BTW") of your choosing. This function must take only the string to be modified as an argument and must return the string with the replacements. You may not use any built-in find, replace, encode, or translate functions, butyou may write your own version of these functions if you wish, and you may use the indexing operator (i.e., the square brackets), the slicing operator (i.e., the colon), the "in" operator, and the lenO function. Type the string to be translated: By the way, can I have a cheeseburger? After replacing phrases BTW I CAN HAS CHEESEBURGER

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

Recommended Textbook for

MySQL/PHP Database Applications

Authors: Brad Bulger, Jay Greenspan, David Wall

2nd Edition

ISBN: 0764549634, 9780764549632

More Books

Students also viewed these Databases questions

Question

What statements did you use? In what tone of voice?

Answered: 1 week ago

Question

LO3 Discuss the steps of a typical selection process.

Answered: 1 week ago