Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a function that translates an English sentence to leetspeak. Hints: You will want to turn your sentence into a list of words, replace those,
Write a function that translates an English sentence to leetspeak. Hints: You will want to turn your sentence into a list of words, replace those, and then turn it back into a sentence before replacing letters. To turn a list of words into a sentence, you can use the syntax: new sentence"".join(old list) This will join all the values in "old list into a string, separated by spaces. If you want to determine if a word is in your dictionary, use "if word in dictionary.keys0 You may assume that the sentences are, much like YouTube comments, devoid of any punctuation or capitalization Use the following general algorithm: Replace the following words . elite -> leet the-> teh hacker-> haxor hack -> hax own>pwn owned ->pwned . e dude - dood rocks-> roxxorz 1md3 most awesome course ever If any word ends with an"s', replace it with a Replace the following letters
Step 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