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

If you need to write a do-while loop that will ask the user to enter a number between 2 and 5 inclusive, and will keep asking un

til the user enters a correct number, what is the loop condition? (2 > number || number > 5) (2<5 number && number > 5) (2 <= number && number <= 5)
Mathematics
1 answer:
Iteru [2.4K]3 years ago
3 0

Answer: (2 > number || number > 5)

Step-by-step explanation:

The do-while loop need to work until the user enters a correct number. In this case the number need to be between 2 and 5 inclusive.

On the opposite, if the user enters a number between 2 and 5 inclusive, he will leave the do-while loop.

Here is how it works : Once the user enters a number, the do-while loop will check this number.

If the number is NOT between 2 and 5 inclusive, the do-while loop will ask again the user to enter a number.

If the number is between 2 and 5 inclusive, the loop stop working.

So the do-while loop need to check if the number IS NOT between 2 and 5 inclusive.

If it is not between 2 and 5 inclusive, it could be :

Smaller than 2 : number < 2

Or greater than 5 = number > 5

The "or" condition is written by the symbols "||".

The loop condition is (2 > number || number > 5).

You might be interested in
Which is a factor of: 2x^2+2x−12 ?
laiz [17]

Answer:

(x - 2) and (x + 3) is a factor of: 2x² + 2x - 12

Step-by-step explanation:

2x² + 2x - 12 given equation

Now divide it by 2 we get,

x² + x - 6

then

x² + x - 6

x² + 3x - 2x - 6

x(x + 3) - 2(x + 3)

<em><u>(x - 2) (x + 3)</u></em>

7 0
3 years ago
Read 2 more answers
You want to obtain a sample to estimate a population proportion. At this point in time, you have no reasonable estimate for the
Vesna [10]

Answer:

A sample size of at least 1,353,733 is required.

Step-by-step explanation:

In a sample with a number n of people surveyed with a probability of a success of , and a confidence level of , we have the following confidence interval of proportions.

\pi \pm z\sqrt{\frac{\pi(1-\pi)}{n}}

In which

z is the zscore that has a pvalue of .

The margin of error is:

M = z\sqrt{\frac{\pi(1-\pi)}{n}}

98% confidence level

So \alpha = 0.02, z is the value of Z that has a pvalue of 1 - \frac{0.02}{2} = 0.99, so Z = 2.327.  

You would like to be 98% confident that you esimate is within 0.1% of the true population proportion. How large of a sample size is required?

We need a sample size of at least n.

n is found when M = 0.001.

Since we don't have an estimate for the proportion, we use the worst case scenario, that is \pi = 0.5

So

M = z\sqrt{\frac{\pi(1-\pi)}{n}}

0.001 = 2.327\sqrt{\frac{0.5*0.5}{n}}

0.001\sqrt{n} = 2.327*0.5

\sqrt{n} = \frac{2.327*0.5}{0.001}

(\sqrt{n})^{2} = (\frac{2.327*0.5}{0.001})^{2}

n = 1353732.25

Rounding up

A sample size of at least 1,353,733 is required.

5 0
4 years ago
What is the equivalent of 3/8​
mixas84 [53]

Answer:

6/16 is equivalent to 3/8 because after dividing the numerator (6) and denominator (16) we get 3/8.

8 0
3 years ago
Read 2 more answers
Which expression is equivalent to -0.25(12 y + 4)
blsea [12.9K]

Answer:

The answer is B

Step-by-step explanation:

-1/4(12y) -1/4(4)

= -3y - 1

8 0
3 years ago
&lt;17 and &lt;18 are vertical angles. m &lt;17=(5x+3)(degrees) and m&lt;18=(3x+23)(degrees) find the measure of &lt;18
UNO [17]
I think c is the answer to ur question
7 0
4 years ago
Other questions:
  • How do you Simplify<br>6a² + ab- 2 b ² + 2a-b ​
    6·1 answer
  • Alina is able to swim at a rate of about 2.5 miles per hour. Talia is able to swim at a rate of 1.8 meters per second. Which sta
    6·2 answers
  • Matilda has been studying exponential functions in her algebra class and has started to notice a pattern. For some exponential f
    14·1 answer
  • Factor completely: x2 + 7x + 10 (x + 5)(x + 2) (x + 10)(x + 1) (x2 + 5)(x + 2) Prime
    8·2 answers
  • One yard is equal to three feet. Which expression represents the number of feet for any given number of yards? A. x-3 B. 3 • x C
    8·1 answer
  • Subtract 4x +5 from 2x-3​
    11·2 answers
  • A figure is shown. <br><br> What is the value of m? <br> ___ degrees
    11·2 answers
  • The number of school buses needed to transport students on a field trip is given by the function
    5·2 answers
  • What is 7x10^-6? Will give brainliest!
    6·1 answer
  • What is the equation for the black line?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!