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
ivolga24 [154]
4 years ago
13

The function below takes one parameter: a list of strings (string_list). Complete the function to return a new list containing o

nly the strings from the original list that are less than 20 characters long. For this question, you'll first want to create an empty list. Then, you'll want to visit every element of the original list checking to see if it is short. You'll append the short strings to your new list. Finally, return the new list.
Computers and Technology
1 answer:
Radda [10]4 years ago
4 0

Answer:

def short_strings(string_list):

   short_list = []

   for s in string_list:

       if len(s) < 20:

           short_list.append(s)

   return short_list

Explanation:

* The code is in Python.

- Create a function called short_strings that takes one parameter, string_list

- Create an empty list called short_list to hold the strings that are less than 20 characters

- Initialize a for loop that iterates through the string_list. Check if there are strings that are less 20 characters in the string_list. If found, put them in the short_list

- Return the short_list

You might be interested in
I am in need of a research topics in networking and security?​
cricket20 [7]
No, you will be fine.
8 0
4 years ago
When installing a network cable with multiple strands, a network technician pulled the cable past a sharp edge and exposes the c
MariettaO [177]

Answer:

A short

Explanation:

A short in electrical terms is an abbreviation for a short circuit. This generally means that there is an unintended connection between two points allowing current to flow where it should not. In your particular case, it means that a cable is damaged and that two or more of the conductors are connected together causing the cable to fail.

8 0
4 years ago
When assigning a value to a string, which of the following rules needs to be followed?
Alecsey [184]

Answer:

Let's say you need to remember some information, the way moviegoers tried to remember the name of the movie. Instead of storing it in your human memory, you can store information in your computer's memory using Python. This is called assigning a string value to a variable.

To assign a string value to a variable in Python, follow this example. Select each part of the code to see how it works with the movie title example.

movieTitle = "Live. Die. Repeat."

This line of Python code is an example of an assignment statement. In an assignment statement, you tell Python, "This variable is assigned this string value."

Explanation:

4 0
3 years ago
Help with prg 140 class it is really giving me a hard time understanding it<br>​
Snowcat [4.5K]

Answer:

post your homework so we can help you.

Explanation:

8 0
3 years ago
Where can the greatest depths be found in the ocean?
34kurt

The answer is C: In ocean trenches.

Since the deepest part of the ocean lies in the Mariana Trench.

I hope this answered your question! :D

7 0
3 years ago
Other questions:
  • Achieving a degree in computer forensics, information technology, or even information systems can provide a strong foundation in
    11·1 answer
  • 6. Which of the following options is used to view a computer's memory properties?
    8·1 answer
  • Write a program to read-in a sequence of integers from the keyboard using scanf(). Your program will determine (a) the largest i
    8·1 answer
  • which programming paradigm do programmers follow to write code for event driven applications? a. object oriented programming. b.
    9·1 answer
  • In the view that follows, which field can't be updated create view example_2 as select invoice_number, invoice_date, invoice_tot
    13·1 answer
  • Obtaining the data of a video file from a flash drive is an example of a(n) _________ operation.
    6·1 answer
  • How to do “Pseudocode” and “FlowChart” in this question ? <br><br> Please Help mee
    9·1 answer
  • The arguments in a method call are often referred to as ____ . The variables in the method declaration that accept the values fr
    10·1 answer
  • What has happened (or is still happening) to make this speech occur? armageddon
    15·1 answer
  • What is the fundamental purpose of sentiment analysis on social media?​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!