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
sergey [27]
3 years ago
15

g Given a character and a list of strings, find strings that do not contain the given character. See the example below. $ (Find

88 (list (list 77 73) (list 89))) ((77 73) (89)) $ (Find 88 (list (list 7
Computers and Technology
1 answer:
Alex_Xolod [135]3 years ago
5 0

Answer:

The solution code is written in Python 3

  1. def findStr(stringList, c):
  2.    output = []
  3.    for currentStr in stringList:
  4.        if c not in currentStr.lower():
  5.            output.append(currentStr)
  6.    return output  
  7. strList = ["Apple", "Banana", "Grape", "Orange", "Watermelon"]
  8. print(findStr(strList, "g"))

Explanation:

Firstly, we can create a function and name it as findStr which takes two input parameters stringList and a character, c (Line 1).

Create a list that will hold the list of strings that do not contain the input character (Line 2).

Create a for-loop to traverse through each string in the list (Line 3).

In the loop, check if the input character is not found in the current string (Line 4), if so, add the current string to the output list (Line 5). Please note we also need to convert the current string to lowercase as this program should ignore the casing.

After completion the loop, return the output list (Line 7).

We can test the function using a sample string list and input character "g" (Line 9 - 10). We shall get the output as follows:

['Apple', 'Banana', 'Watermelon']

You might be interested in
___________ colors come forward and command attention. ______________ colors recede away from our eyes and tend to fall into the
aliya0001 [1]

Answer:

"Warm; Cool/receding" is the correct answer.

Explanation:

  • The color temperature would be referred to as summer and winter upon that color wheel, the hottest becoming red/orange as well as the most cooler always being bluish or greenish.
  • A terminology to define the warmth of the color is termed as Warm colors. Warm hues are prominent as well as lively just like reds, oranges, etc.

Thus the above is the right answer.

4 0
3 years ago
Write a python function that on input takes a list l of integers and returns the count of how many of the integers in the list a
stepan [7]
Def countEvenIntegers(integerList):     counter = 0     for item in integerList:          if (item%2 = 0):               counter += 1     return counter
5 0
3 years ago
What type of energy do electronic devices use?
Ket [755]
They use electrical energy. Majority of devices that people now use are controlled by semi conductor components. Your answer is they are using electrical energy! But sometimes they do use radiation.
5 0
3 years ago
A web client is sending a request for a webpage to a web server. from the perspective of the client, what is the correct order o
earnstyle [38]
From the perspective of the client,  the correct order of the protocol stack that is used to prepare the request for transmission <span>for a webpage to a web server </span><span>is:
</span>HTTP<span> - The Hypertext Transfer Protocol </span>
TCP  -
Transmission Control Protocol
IP  -
Internet Protocol
Ethernet
8 0
3 years ago
def c_to_f(): # FIXME return # FIXME: Finish temp_c = float(input('Enter temperature in Celsius: ')) temp_f = None # FIXME: Call
Agata [3.3K]

Answer:

  1. def c_to_f(celsius):  
  2.    return celsius * 9/5 + 32
  3. temp_c = float(input('Enter temperature in Celsius: '))  
  4. temp_f = None  
  5. temp_f = c_to_f(temp_c)  
  6. print('Fahrenheit:' , temp_f)

Explanation:

The first piece of code we can fill in is the formula to convert Celsius to Fahrenheit and return it as function output (Line 2).

The second fill-up code is to call the function c_to_f and pass temp_c as argument (Line 7). The temp_c will be processed in the function and an equivalent Fahrenheit value will be returned from the function and assigned it to temp_f.

4 0
4 years ago
Other questions:
  • You can change the color of the value of a cell or the background
    14·2 answers
  • If you have cut or copied a set of information, which procedure will NOT work to paste it back into the worksheet?
    14·1 answer
  • 1. _____ can’t be rewritten by the computer in which it’s installed, but it has the advantage of being very _____.
    6·1 answer
  • If I want to have an estimate of the number of people who visited my website, which metric should I use?
    5·2 answers
  • La computadora es un medio de comunicacion moderno?
    8·1 answer
  • Business conducted using the internet
    9·1 answer
  • Where do you get your news? Is it owned by a large conglomerate does it matter to you who own your local news outlets? why or wh
    5·1 answer
  • Which of the following statements is not true? Question 16 options: a) SQL is the most popular query language used for interacti
    10·1 answer
  • QBasic commands any 10 with examples
    5·1 answer
  • What are two benefits of defining a function?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!