Question: In Python, create the functions in parts 1 through 3. Part 2 should use the built-in set function while Part 3 should NOT. 1. def

In Python, create the functions in parts 1 through 3. Part 2 should use the built-in set function while Part 3 should NOT.

1. def normalize(input_string):

  • input: a string of text characters. Each character is called a token.

  • output: an array of 'letters'. Each item in the array corresponds to a letter in input_string (in lowercase)

  • for example, the input "O.K. #1 Python!" would generate the following list: ['o','k','p','y','t','h','o','n']

  • don't try to replace, delete, or substitute -- if the 'token' is a letter it passes the test.

2. def find_missing_letters(sentence):

  • the input sentence is an array/list (created from normalize())

  • returns a sorted array of letters that are NOT in the sentence

  • use the built in Python type set to solve

3. 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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!