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
jekas [21]
4 years ago
11

Write the function listBuilder(l1, length) that takes a list of strings called l1 and an int called length and returns another l

ist that contains all the strings in l1 that have a length of at least length.Example:Input Outputl1 = ["Hello", "I", "am", "a", "list"] length = 4 ["Hello", list"]l1 = ["Homework", "is", "fun"] length = 8 ["Homework"]l1 = ["CS103", "is", "the", "best"} length = 8 []
Computers and Technology
1 answer:
Grace [21]4 years ago
7 0

Answer:

The solution code is written in Python 3:

  1. def listBuilder(l1, length):
  2.    result = []
  3.    for x in l1:
  4.        if(len(x) >= length):
  5.            result.append(x)
  6.    return result

Explanation:

Firstly, we create a variable result to hold the list will be returned at the end of the function. (Line 1)

Next, we create a for-loop to traverse the string in the l1 list (Line 4) and check for each string if their length is equal or bigger than the input length (Line 5). If so, we use append method to add the string to the result list.

At the end, return the result list as output (Line 8).

You might be interested in
Why does Linux make use of tasklets (i.e., software interrupts) instead of executing all interrupt-related activity in the (hard
Eddi Din [679]

Answer:

Although some devices can be controlled using nothing but their I/O regions, most real devices are a bit more complicated than that. Devices have to deal with the external world, which often includes things such as spinning disks, moving tape, wires to distant places, and so on. Much has to be done in a time frame that is different from, and far slower than, that of the processor. Since it is almost always undesirable to have the processor wait on external events, there must be a way for a device to let the processor know when something has happened.

That way, of course, is interrupts. An interrupt is simply a signal that the hardware can send when it wants the processor's attention. Linux handles interrupts in much the same way that it handles signals in user space. For the most part, a driver need only register a handler for its device's interrupts, and handle them properly when they arrive. Of course, underneath that simple picture there is some complexity; in particular, interrupt handlers are somewhat limited in the actions they can perform as a result of how they are run.

5 0
3 years ago
Why now days 3D images are used in cartoons? What are the drawbacks of 2D image?
antoniya [11.8K]

Answer:

There are no drawbacks

Explanation:

People just think 3D is more modern-ish. I liked 2D better, but whatever- things are changing.

5 0
3 years ago
Read 2 more answers
Which term best describes a network connection that uses the Internet to give mobile users or branch offices secure access to a
NNADVOKAT [17]

Answer:

Virtual Private Network (VPN)

Explanation:

A VPN can extend a private network over the internet securely to a mobile user or branch office. The traffic is encrypted between the private network and branch office or mobile users. VPN enables users to access and share resources like they were directly connected to the main network.

6 0
3 years ago
Consider a physical address with a page frame size of 2kb. how many bits must be used to represent the page-frame offset of the
MArishka [77]
11 bits would be enough for 0 - 2047 decimal, 2048 (2k) possible values. 2048 itself would need a 12 bit, which would allow from 0 - 4095 possible values. Useful tidbit to remember: 1024, 1k is ten bits.
7 0
4 years ago
The objective is to work with your partner to fix the HTML bugs so that none of the code is pink. In general, how do I change HT
Elan Coil [88]

Answer:

Click inspect then go to change color

Explanation:

there you go have a nice day!

8 0
3 years ago
Other questions:
  • Which is an example of correct HTML? <h1> This is a heading</h1>
    9·2 answers
  • Which of the following is the easiest way for visitors to learn about a business while visiting a website?
    13·1 answer
  • (Display four patterns using loops) Ask the user to enter an integer to
    8·1 answer
  • Most operating systems perform all of the following tasks except _____. a. displaying the Graphical User Interface b. indexing t
    13·1 answer
  • What is the largest software application on a computer?
    15·2 answers
  • The cost of an items is Rs 200. what will be the cost of 50 such items. write a simple program​
    10·1 answer
  • What is the term for unsolicited Email​
    15·1 answer
  • I WILL MARK BRAINLEST
    7·1 answer
  • Can anyone tell me about Microsoft some important features for partical
    11·1 answer
  • Describe the role of a distributed file system in a job execution environment such as MapReduce in a large-scale cloud system. g
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!