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
Ron is creating building blocks in Word. How can he make the building blocks that he created available?
daser333 [38]

A) Store those building in Normal template

7 0
3 years ago
Read 2 more answers
How do I cancel and end my brainy subscription?
ella [17]

Answer:

Brainly Premium?

Explanation:

Go to your account, go to settings, and find the "cancel subscription" button in the *subscription* tab. Hope this helped!

7 0
3 years ago
Read 2 more answers
What udp port is used for i k e traffic from vpn client to server?
Reil [10]
<span>Ports are used to distinguish among multiple destination processes in a single host computer.</span>
UDP (User Datagram Protocol)<span> port 500 is used for i k e traffic from VPN client to server.
</span><span>This port is used during the establishment of secure VPN tunnels.
</span>
6 0
3 years ago
How do you put a picture when you ask a question?
Setler [38]

Answer:

there should be an option to attach an item. if not try pasting it

Explanation:

5 0
3 years ago
Read 2 more answers
What would I need to make the perfect music video
Lera25 [3.4K]
To make the perfect music video, you would need a bunch of b-roll and clips that relate to the song. If it’s a slow, relaxing song, you want things that are slow and represent peace. If it’s about something specific, you should have a story behind it to explain. Hope this helps! :)
4 0
3 years ago
Other questions:
  • It is not recommended by the USA EPA, but adding refrigerant to a leaking A/C system is
    13·1 answer
  • The strFirstName and strLastName variables contain the strings "Jane" and "Jones," respectively. Which of the following statemen
    14·1 answer
  • What are the most popular/up-and-coming social media applications?
    10·2 answers
  • A user saves a password on a website the user logs into from a desktop. Under which circumstances will the password be saved on
    14·1 answer
  • What is the first step to creating a PivotTable?
    11·1 answer
  • Software referd to the physical parts of the computer True or False
    9·2 answers
  • Unless grunkle stan pines is mistaken, there is a family of deer’s in his garden
    6·1 answer
  • 30 points) Suppose you are given a string containing only the characters ( and ). In this problem, you will write a function to
    14·1 answer
  • Graphics created within Illustrator CC are always vector graphics true or false
    9·1 answer
  • what extension of nat allows several hundred workstations to access the internet with a single public internet address
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!