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 of the following class definition defines a legal abstract class Group of answer choices public class Rectangle abstract {
valkas [14]
<h2>Question</h2>

Which of the following class definition defines a legal abstract class Group of answer choices

(a)

public class Rectangle abstract {

   public abstract double findArea ( );

   

}

(b)

public abstract class Rectangle {

   public abstract double findArea ( );

   

}

(c)

public class Rectangle {

   public abstract double findArea ( );

   

}

(d)

public class abstract Rectangle {

   public abstract double findArea ( );

   

}

<h2>Answer:</h2>

(b)

public abstract class Rectangle {

   public abstract double findArea ( );

}

<h2>Explanation:</h2>

When a class is declared with the abstract keyword, the class is called an abstract class. Abstract classes cannot be instantiated and may include one or more abstract methods. If a class contains an abstract method, then it (the class) must be declared abstract.

In Java, abstract classes are defined using the following format:

<em>[access_modifier]</em> abstract class <em>[name_of_class]</em>

[access_modifier] specifies the access modifier of the class which could be public, private, e.t.c

abstract is the keyword that specifies that the class is an abstract class.

class is a keyword used for defining classes

name_of_class specifies the name of the class.

The only option that fulfils this format is <em>option b</em> where;

(i) The access modifier is public

(ii) The name of the class is Rectangle

Option a is not correct because the <em>abstract</em> keyword is supposed to come before the <em>class</em> keyword.

Option c is not correct because the keyword <em>abstract</em> is missing. In other words, the class must be declared abstract since it contains abstract method findArea();

Option d is not correct because the <em>abstract</em> keyword is supposed to come before the <em>class</em> keyword.

7 0
2 years ago
The process of encoding messages or information in such a way that only authorized parties can read it is called ____________.
lukranit [14]

Answer:

Encryption

Explanation:

Encryption is a term in the field of computer security (Cryptology) this is a process of encoding information in a way that hackers and eavesdroppers cannot read. The process of encryption involves a plain text (message) been converted into a scrambled text (cipher text) with an encryption algorithm (key) in this way, if the message is intercepted by a hacker he/she is unable to read the contents. Only the authorized party with a decryption key will be able to decrypt back to a plain text and read the contents of the message

3 0
2 years ago
While inspecting an element in the DOM on my website using the Chrome Devtools I accidentally deleted the DIV that had all my au
Kobotan [32]

Answer:

Refresh the page, it will reset all the underlying code.

Explanation:

Inspecting an element is essential for web developers in building websites faster and better. The Chrome DevTools is a powerful tool that is integrated into the Chrome browser to assist developers in on-the-go website troubleshooting.

Editing codes in the Chrome DevTools console does not affect the source code of the website hosted on a server, it just provides instant editing functions for troubleshooting or website enhancement.

Therefore, refreshing the page, re-loads the website again from its database which will show the unedited website. In our scenario, after refreshing the page, all the deleted DIV that contains all the authentication will reappear again.

4 0
2 years ago
FTP is commonly used to __________ and __________ files to a server.
Aleks [24]

Answer:

upload; download

Explanation:

FTP (File Transfer Protocol) is an internet protocol used to upload and download a file to a server, there are some programs help us to transfer this data to a server, in some cases, we're going to need these programs to upload website files to the server like images or videos, or some websites where do you need a user and passwords to upload file by FTP

8 0
3 years ago
A certain manager makes the following statement "Our internet company is in business for the money, making profits, and making t
julia-pushkina [17]

Answer:

d. Stockholder theory

Explanation:

The theory of maximising profits

8 0
3 years ago
Other questions:
  • James, a technician, needs to format a new drive on a workstation. He will need to configure read attributes to specific local f
    5·1 answer
  • The requirement that each term in the objective function only contains a single variable is in a linear program is referred to a
    5·1 answer
  • When excel imports an access table, the data is placed in a worksheet _____?
    7·1 answer
  • Choose a project with a relatively simple description (building a LAN, designing a web page, inventing a new communication devic
    6·1 answer
  • Saas provides services to an organization that requires the standard business process infrastructure such a CRM
    7·1 answer
  • Misperceptions can lead to miscommunication. List an example from the article.(site 1)
    10·2 answers
  • You are network administrator for an Active Directory forest with a single domain. Then network has three sites with one domain
    12·1 answer
  • Please help meeee , you will get 20 points
    9·2 answers
  • Consider the following statement: String myMiddleInitial = “h”;
    15·1 answer
  • How ict tools changed the way we live explain it​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!