Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

More Books

Students also viewed these Databases questions