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
masya89 [10]
3 years ago
14

How to solve 3(x - 2) = 9x

9x" alt="3(x - 2) = 9x" align="absmiddle" class="latex-formula">
Computers and Technology
1 answer:
LekaFEV [45]3 years ago
4 0
3x - 6 = 9x

-6 = 6x

-1 = x
You might be interested in
To what extent can u justify that computer is not the only ICT tool?​
svlad2 [7]

Answer:

well all electronics are

Explanation:

3 0
3 years ago
He trampled all over my feelings when he told me he didn’t want to go to dance with me
Tatiana [17]
If he thinks he could just do that to u he is wrong ur probably way hotter than he is keep ur head up y’all and u the best!
4 0
3 years ago
Which of the following statements is true regarding firewalls?
garik1379 [7]

Answer:

A defense-in-depth structure of firewalls provides more protection for certain subnets than for others.

Explanation:

A firewall provides a defense-in-depth structure, this provides more protection for certain subnets than for others.

A defence in depth structure is such a structure which encrypts data. Here even if an attacker gets pass the firewall and steal data, such data is encrypted already.

Defense-in-depth user protection involves a combination of security offerings such as WAF, antivirus, antispam software, etc, It also invole training to block threats and protect critical data.

5 0
4 years ago
What are scientific theories and laws developed
vladimir1956 [14]

Answer:

In general, a scientific law is the description of an observed phenomenon. It doesn't explain why the phenomenon exists or what causes it. The explanation of a phenomenon is called a scientific theory. It is a misconception that theories turn into laws with enough research.

Explanation:

8 0
4 years ago
Suppose that we are working for an online service that provides a bulletin board for its users. We would like to give our users
nekit [7.7K]

Answer:

Here is the JAVA program:

import java.util.*;   //to use Scanner class, Lists

public class Main{  //name of class

public static void main(String[] args) {  //start of main function

  String sentence = "CaT and catalog are not same";  //a string

  sentence = sentence.toLowerCase();  // converts the words in the sentence to lowercase

  Scanner sc = new Scanner(sentence);  //creates Scanner class object

  List<String> profane_words = profaneList();  // creates a list of profane words i.e. cat, dog and llama

  int count = 0;  //count the number of profane words

  while (sc.hasNext()) {  //reads string as tokens and returns true if scanner has another token

      String word = sc.next();  //returns the next complete token (word) and store it into word variable

      for (String profane : profane_words) {  // looks for each profane in profane_words list

          if (word.matches(".*\\b" + profane + "\\b.*") && ! sentence.matches(".*" + profane + "[a-z].*\\b" + profane + "\\b.*") && ! sentence.matches(".*[a-z]" + profane + ".*\\b" + profane + "\\b.*")) {  //uses matches() method that identifies whether a word in the string matches the given regular expression.

              count++;  //each time if the word of sentence matches with word given in profane_list then 1 is added to count

              System.out.println("The word " + profane + " is a profane!");  //displays the word which is profane

          }  }    }

  System.out.println("Number of profane words: "+ count);  }  //displays the number of profane words found in the sentence

private static List<String> profaneList() {  //list of profane words

  List<String> profane_words =  new ArrayList<>();  //creates an array list of profane words named as profane_words

  profane_words.add("dog");  //adds word "dog" to the list of profane words

  profane_words.add("cat");  //adds word "cat" to the list of profane words

  profane_words.add("llama");  //adds word "llama" to the list of profane words

  return profane_words;  }} //returns the list of profane words

Explanation:

I will explain the program with an example:

sentence = "CaT and catalog are not same";  

First this sentence is converted to lower case as:

sentence = "cat and catalog are not same";  

Now the while loop uses hasNext() which keeps returning the next token and that token is stored in word variable.

Next the for loop iterates through the list of profane_words to check each profane word with the word in a sentence.

Next this statement:

if (word.matches(".*\\b" + profane + "\\b.*") && ! sentence.matches(".*" + profane + "[a-z].*\\b" + profane + "\\b.*") && ! sentence.matches(".*[a-z]" + profane + ".*\\b" + profane + "\\b.*"))

uses regular expressions to find the profane words in the sentence. The logical operator&& AND between the three expressions is used so all of the three must hold for the if condition to evaluate to true.

word.matches(".*\\b" + profane + "\\b.*")  expression uses \b to check an exact match of the word. \b is meta-character to find a match at the beginning and at the end. So this checks if the word of a sentence matches with the profane in the profane list.

! sentence.matches(".*" + profane + "[a-z].*\\b" + profane + "\\b.*") && ! sentence.matches(".*[a-z]" + profane + ".*\\b" + profane + "\\b.*"))

These two expressions check if profane does not include as a part of another word in the sentence. This solves the extra challenge. Like here in the sentence we have a word catalog which is not a profane but a profane cat is included in this. So this will not be considered as a profane.

Every time a word matches with the profane from profane list, the value of count variable is incremented to 1.

In the end the statement:    

System.out.println("Number of profane words: "+ count);  

prints the number of profane words in the sentence.

List<String> profane_words =  new ArrayList<>(); creates the list of profane words and add() method adds the words to the list profane_words. So profane_words list contain "cat", "dog" and "llama"

Hence the output of this program is:

The word cat is a profane!                                                                                                                      Number of profane words: 1

The program output is attached in screenshot

4 0
4 years ago
Other questions:
  • Alison is having a hard time at work because her Inbox is flooded with emails every day. Some of these emails are unsolicited. S
    12·2 answers
  • Which expression adds 1 to the element of array arrayname at index i?
    13·1 answer
  • What is a organisation in office technology
    7·1 answer
  • A computer with a domain name is called a
    8·2 answers
  • What is the famous saying among computer programmers that refers to the fact that computers cannot tell the difference between g
    15·2 answers
  • What have very strong chemical bonds and cannot be reshaped when heated.​
    6·1 answer
  • If x=3.123, then int(x) will give ?
    5·1 answer
  • World pade is world processing software true or false​
    15·1 answer
  • Identify when programmers use an Else statement.
    15·2 answers
  • Design an application for the Sublime Sandwich Shop. The user makes sandwich order choices from list boxes, and the application
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!