208k views
5 votes
def find_missing_letters(sentence): the input sentence is an array/list (created from normalize()) returns a sorted list of letters that are NOT in the sentence use the built in Python type set to solve (see previous lesson) def find_missing letters algorithm(sentence): the input sentence is an array/list (created from normalize()) returns a sorted array of letters that are NOT in the sentence you must NOT use the set type Hints for find_missing_letters algorithm: create your own algorithm and use only the data types (other than set) that we have discussed the set datatype is removed during the running of the tests (so don't use it) the output should be the same as that from find_missing_letters (easy to test) if you find yourself writing over 30 lines of code, you are proba

User Jokuskay
by
5.3k points

1 Answer

0 votes

Answer:

Follow step by step explabation to get answer to the question and also see attachments for output.

Step-by-step explanation:

code:

def normalize(input_string):

l=list();

for i in input_string:

if (i>='a' and i<='z') or (i>='A' and i<='Z'):

l.append(i.lower())

return l

def find_missing_letters_algorithm(sentence,prevsentece):

l=list();

for i in prevsentece:

i=i.lower();

if i not in sentence:

l.append(i)

return l

print(find_missing_letters_algorithm(normalize("O.K. #1 Python!"),"O.K. #1 Python!"))

def find_missing_letters(sentence): the input sentence is an array/list (created from-example-1
User Jbbarth
by
5.2k points