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
Which slide elements must claire use to enhance her presentation?
Crank

The answer for the 1st blank is text.


6 0
3 years ago
Read 2 more answers
Which of the following are peripheral devices?
Fittoniya [83]

Explanation:

I think it's speakers,

7 0
3 years ago
Read 2 more answers
Getting access to web browsing software to install it on a computer or to update your existing software is called _________ .
Ivenika [448]

Answer:

Downloading and/or Burning it on to your computer

Hope this helped! if so please mark it as brainliest

Explanation:

8 0
3 years ago
Read 2 more answers
A high school in New York (school A) is using videoconferencing technology to establish student interactions with another high s
Montano1993 [528]

Answer: This is private IP address

Explanation:

192.168.25.10 is a private IP address and is reserved for use only within an organisation so it cannot be used to communicate with the outside world. So in order to have videoconferencing they have to share their public IP addresses.

4 0
3 years ago
The enhanced for statement allows you to iterate through the elements of an array or a collection without using a counter. Give
lesya [120]

Answer:

Check the explanation

Explanation:

public class EnhancedForExample {

   public static void main(String[] args) {

       int[] arr = {4, 2, 9, 1, 5, 7};

       for(int num : arr) {

           System.out.println(num);

       }

   }

}

Kindly check the attached image below for the code output.

7 0
3 years ago
Read 2 more answers
Other questions:
  • An operating system coordinates the BLANK of a computers operation.
    7·2 answers
  • What connector has 4 pins, is used for older IDE drives and some SATA drives, and can provide +5 V and +12 V power outputs?
    11·1 answer
  • design aDesign a queue abstract data type for float elements in a language that you know, including operations for enqueue, dequ
    10·1 answer
  • Given a Student class, create a class with following characteristics:
    6·1 answer
  • Write a program that declares a constant named QUARTS_IN_GALLON which holds the number of quarts in a gallon (4). Also declare a
    8·1 answer
  • What are the first letters of each of the 3 main colors in javaScript? (seperate with commas)
    9·1 answer
  • Which view in the View tab of the ribbon is the easiest place to add a header or a footer? Normal view Custom Views Page Layout
    5·2 answers
  • DIRECTIONS: Organize your desktop. Name the 5 folders based on the files given below. Organize your own desktop by sorting the g
    12·1 answer
  • At the heart of every computing device is a(n) _______________, which is usually a single, thin wafer of silicon and tiny transi
    12·1 answer
  • Design a circuit that will tell whether a given month has 30 days in it.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!