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
geniusboy [140]
3 years ago
6

How can the compound conditional expression ((average > 79 && average <= 89)) be written to eliminate the logical

operator - without changing the logic?
Chemistry
1 answer:
elena-14-01-66 [18.8K]3 years ago
7 0

Answer:

Remove the && and create a nested if statement.                                

Explanation:

The statement  ((average > 79 && average <= 89)) states a condition that the value of average is supposed to be greater than 79 and less than equals to 89. Since AND (&&) operator is being used between both the expressions so both should be true to make the condition evaluate to true. This means that value of  average variable is greater than 79 AND less than or equal to 89.

Now the logical operator && can be eliminated by using nested-if statement which refers to the if statement inside another if statement. So the above statement can be written as:

if (average>79)

{  

 if (average<=89)

}

It will check firstly the average value for being greater than 79 (if average value is greater than 79? ) AND then check average value to see if that less than or equal to 89.

Usually in nested if statement there is an else part at the end which is executed in case all the if conditions evaluates to false.

It will be written like this:

if (average>79)

{   if (average<=89)

{ /*some block of the code to be executed in case the above two if     conditions evaluate to true */ }   }

else

{ //executed if both the above if conditions evaluate to false.}

You might be interested in
QUESTION 6
polet [3.4K]
I would say the answer is C. Mutualism
4 0
3 years ago
Read 2 more answers
Hydrogen gas and aqueous zinc chloride are produced by the reaction of aqueous hydrochloric acid and solid zinc . Write a balanc
Ymorist [56]

<em>1. Write out all the ions/elements and indicate whether they are reactants or products. </em>

<u>Reactants:</u>

Aqueous Hydrochloric Acid: HCl (H has a charge of +1 and Cl has a charge of 1-, so when an ionic bond forms they will form HCl).

Solid Zinc: Zn (since it is a solid zinc with no other forms of elements, the zinc is pure).

<u>Products:</u>

Hydrogen gas: H2 (it has to be H2 because Hydrogen is a diatomic element, and when by itself during reactions, will be H2 instead of H).

Aqueous Zinc Chloride: ZnCl2 (Zn has a charge of 2+ and Cl has a charge of 1-, so through an ionic bond, they will form ZnCl2).

<em>2. Using this information, you can then write out the unbalanced equation.</em>

HCl + Zn -> H2 + ZnCl2

<em>3. Next, indicate their states of matter and any aqueous solutions. </em>

HCl (aq) + Zn (s) -> H2 (g) + ZnCl2 (aq)

<em>4. Try different numbers until you get the same numbers of H, Cl, and Zn on both sides. </em>

2 HCl (aq) + Zn (s) -> H2 (g) + ZnCl2 (aq)

As you can see, the equation contains 2 Hydrogen atoms on both sides, 2 Chloride atoms on both sides, and 1 Zinc atom on both sides. The equation is chemically balanced.

5 0
4 years ago
Water is a good choice of solvent because it is benign, cheap and readily available. Identify two characteristics that make wate
Mila [183]

Answer:

Two characteristics that make water a good choice for the recrystallization solvent for benzoic acid are

  1. Low solubility for benzoic acid at room temperature
  2. Less expensive

Explanation:

Characteristics of a Good Recrystallization Solvent:

  1. Cheap.
  2. High volatility.
  3. No reaction with substrate to be made pure.
  4. Insoluble impurities should not be dissolced by the olvent at all temperatures.
  5. At room temperature the solvent should have high solubility for soluble impurities well
  6. At  room temperature the substance to be purified should be insoluble in the solvent.

As such water has both low solubility for benzoic acid at room temperature and water is cheap or readily available

3 0
4 years ago
Which describes an ionic bond?
marysya [2.9K]
The correct answer is A: Formed by the sharing of valance electrons between atoms.
Hope this helps :D
6 0
3 years ago
Explain why the product at the negative electrode is not always a metal.
Elena-2011 [213]

Answer:

Whether you get the metal or hydrogen during electrolysis depends on the position of the metal in the reactivity series: the metal will be produced if it is less reactive than hydrogen. hydrogen will be produced if the metal is more reactive than hydrogen.

3 0
3 years ago
Other questions:
  • A solution with a concentration higher than the solubility is ________.
    9·1 answer
  • Which of the following is the balanced form of the equation CH4 + O2 → CO2 + H2O?
    6·2 answers
  • Scientists can use chemicals to clean toxins from the soil. What does this<br> show about chemicals?
    8·1 answer
  • 49.
    8·2 answers
  • CAN SOMEONE DO MY PROJECT PLEASE!!!
    11·2 answers
  • An atom has 8 protons, 8 neutrons and 9 electrons. is thus a cation, anion, or neutral atom?​
    5·1 answer
  • How many atoms are there in 5K2CO3
    6·1 answer
  • How many liters of N2 are needed to react with 92 g of K, at STP, according to the following reaction? (Balance equation first.)
    14·1 answer
  • calculate the difference in slope of the chemical potential against temperature on either side of the normal freezing point of w
    13·1 answer
  • How many grams are in 2.34 moles of Li?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!