Computers and Technology

Implement the following functions

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']
look at the documentation for string functions; don't try to replace, delete, or substitute -- if the 'token' is a letter it passes the test.

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 (see previous lesson)

def find_missing_letters_algorithm(sent ence):

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

implement the function pipeline(), which pipes the output of each step in the pipeline process into the next stage. For example, if you had the functions a1, b2, c3, pipeline would just do something like return c3(b2(a1())).

The answer should read (inside out) and be a single line of code.

You can use either find_missing_letters_algorithm or find_missing_letters since both return the same output.

Your final stage should be calling visualize (already done)

starter code

import lesson

def test_missing_letters():
sentence = lesson. normalize("I am missing many letters")
s = lesson. find_missing_letters(sentence)
print(s)

# First test your implementation
test_missing_letters()

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 21:00, Unicorn66y
If you have a lien on your vehicle, you cannot apply for a duplicate copy of your vehicle’s certificate of title. true or false
Answers: 1
image
Computers and Technology, 22.06.2019 22:40, nsuleban9524
When you type the pwd command, you notice that your current location on the linux filesystem is the /usr/local directory. answer the following questions, assuming that your current directory is /usr/local for each question. a. which command could you use to change to the /usr directory using an absolute pathname? b. which command could you use to change to the /usr directory using a relative pathname? c. which command could you use to change to the /usr/local/share/info directory using an absolute pathname? d. which command could you use to change to the /usr/local/share/info directory using a relative pathname? e. which command could you use to change to the /etc directory using an absolute pathname? f. which command could you use to change to the /etc directory using a relative pathname?
Answers: 3
image
Computers and Technology, 22.06.2019 22:40, shaylawaldo11
Write a program that defines symbolic names for several string literals (chars between quotes). * use each symbolic name in a variable definition. * use of symbolic to compose the assembly code instruction set can perform vara = (vara - varb) + (varc - vard); ensure that variable is in unsigned integer data type. * you should also further enhance your symbolic logic block to to perform expression by introducing addition substitution rule. vara = (vara+varb) - (varc+vard). required: debug the disassembly code and note down the address and memory information.
Answers: 3
image
Computers and Technology, 22.06.2019 22:50, cheyennecarrillo14
Which is the best minecraft server? a. mineplex b. worldonecraft c. 9b9t d. 2b2t
Answers: 2
Do you know the correct answer?
Implement the following functions

def normalize(input_string):

input: a stri...

Questions in other subjects: