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
Under the Home tab, controls for aligning text and objects can be found in the
lorasvet [3.4K]
I believe the answer is editing group
7 0
3 years ago
Read 2 more answers
You have a folder on your Windows desktop system that you would like to share with members of your development team. Users need
horrorfan [7]

Answer:

modify the NTFS permissions on the folder

Explanation:

In order to solve this problem what you need to do is to modify the NTFS permissions on the folder. The NT File System permissions are security measures blocking access to manipulation of files within a directory and affects local users as well as network users. By adjusting the permissions of this within the folder that the members are trying to access then it will give them the ability to modify the files.

5 0
3 years ago
Lord Strawberry, a nobleman, collected birds. He had the finest aviary in Europe, so large that eagles did not find it uncomfort
creativ13 [48]

Answer:

That was a very great story that I totally did NOT read cause it too long 0-0.

Explanation:

To my ferns.....GET ON RN CAUSE I WONLEY T^T

Anyways wuv c'alls and have a good day :3

8 0
2 years ago
Text that is heavier or darker than other text in the document is considered _____.
kvv77 [185]

The text that is heavier or darker than other text in a document is considered  Bold.

Hope this helped!~

7 0
3 years ago
Read 2 more answers
PLEASE I NEED HELP PLEASE PLEASE<br> Which function prompts the user to enter information?
Stels [109]

In python the input() function prompts the user to enter information.

5 0
2 years ago
Other questions:
  • When approved for a loan, an individual essentially applied for aid in the area of...
    15·1 answer
  • You are attempting to update a Windows image that has been mounted under C:\mount on your local system. What command must you us
    13·1 answer
  • Explain why the game of economics has no winner
    8·1 answer
  • After trying multiple times, a coworker is not able to fit a motherboard in a computer case, and is having difficulty aligning s
    11·1 answer
  • Which of these are forms of data? Check all that apply.
    8·2 answers
  • What two pieces of information would you need in order to measure the masses of stars in an eclipsing binary system?
    9·1 answer
  • to add data to to a chart, you must format data from another microsoft office product, that automatically opens. whats the name
    10·1 answer
  • Small data files that are deposited on a user's hard disk when they visit a website are called _______.
    6·2 answers
  • How will the health care professions be affected by all the computerized and technical advances concerning disabilities?
    9·1 answer
  • Please answer the following in python: Answering the ones that have #TODO
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!