1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Cerrena [4.2K]
3 years ago
13

Implement the following functions def normalize(input_string): input: a string of text characters. Each character is called a to

ken. 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'] take a look at the Python documentation for string functions (url given below); don't try to replace, delete, or substitute -- if the 'token' is a letter it passes the test.
Computers and Technology
1 answer:
Crank3 years ago
6 0

Answer:

  1. def normalize(input_string):
  2.    output = []
  3.    for c in input_string:
  4.        if(c.isalpha()):
  5.            output.append(c.lower())
  6.    
  7.    return output
  8.    
  9. print(normalize("O.K. #1 Python!"))

Explanation:

Firstly, create a function normalize that takes one input string (Line 1).

Next, we create an empty list and assign it to output variable (Line 2). This list will hold all the letters from the input string.

Create a for loop to traverse each of the character in the input string (Line 4) and then use isalpha() method to check if the current character is a letter (Line 5). If so, add the letter to output list (Line 6). Please note we can convert the letter to lowercase using lower() method.

After completing the loop, return the output list (Line 8).

We can test the function using the sample input given in the question (Line 10) and we shall get ['o', 'k', 'p', 'y', 't', 'h', 'o', 'n']

You might be interested in
In order to be compliant with the NIST publications, policies must include key security control requirements. One of these key r
rodikova [14]

Answer:

The answer is "Option A".

Explanation:

A comprehensive collection of principles, guidelines, proposals, and studies on information and information systems privacy and safety are produced and carried out in the NIST publications.

  • The FIPS management standards for federal information and security laws contain various technical reporting sequences.
  • This process takes place after a plan is identified, reviews are carried out and risk analysis is performed.
8 0
3 years ago
A user calls to report that she is experiencing intermittent problems while accessing the wireless network from her laptop compu
mel-nik [20]

Answer:

Interference of signal and the range between the user and the access point.

Explanation:

Elevators, specifically those with high voltage, are notoriously known for being a source of very strong magnetic fields. They produce a lot of harmonics that causes signal interference and noise. Whenever there is any kind of noise in a network, it causes huge intermittent connection. Also, the farther away the user is from the router or the AP, the weaker the signals and the more the intermittencies.  The user is recommended to be within the edges if the range limit.

3 0
3 years ago
Read 2 more answers
It’s just a multiple choice question about emails
cestrela7 [59]
The Answer is : A, B , C .
7 0
3 years ago
Read 2 more answers
A ____ is a key that is composed of more than one attribute.
Artist 52 [7]

Answer: A primary key that is made up of more than one attribute is known as a composite key.

4 0
2 years ago
Four reasons why computers are powerful
Setler79 [48]

Answer:

Computers are powerful tools because they can process information with incredible speed, accuracy and dependability. They can efficiently perform input, process, output and storage operations, and they can store massive amounts of data. ... Midrange servers are bigger and more powerful than workstation computers.

8 0
3 years ago
Other questions:
  • Use a web browser to find three examples of static webpages and three examples of dynamic webpages, and note the URLs for each p
    11·1 answer
  • Which of the following information is okay to share on social networking site?
    11·2 answers
  • What do you believe are the motives of a cyber criminal? Why?
    15·1 answer
  • Describe the major research, discoveries, or impact Timothy Berners-Lee has made on the scientific community. 100 points for ans
    6·1 answer
  • In BitTorrent, suppose Alice provides chunks to Bob throughout a 30-second interval. Will Bob necessarily return the favor and p
    5·1 answer
  • A ________ is a very large general-purpose computer that is capable of performing very many functions as if these are done simul
    8·1 answer
  • ________ are chunks of software - installed on one's computer, tablet, or smartphone - that are gateways to games, online resour
    8·1 answer
  • Which of the following remote access security technologies performs authentication through a three-way handshake (that is, chall
    8·1 answer
  • What is the positional weigh of the digit 7 in the octal number 7642 ?​
    15·1 answer
  • Which statement is true about biometrics as an authentication method?​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!