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
kondor19780726 [428]
3 years ago
12

imagine that you wanted to write a program that asks the user to enter in 5 grade values. the user may or may not enter valid gr

ades, and you want to ensure that you obtain 5 valid values from the user. which nested loop structure would you use?
Computers and Technology
1 answer:
Aloiza [94]3 years ago
7 0

In a computer program, loops are used to perform repetitive operations until a condition is met.

The nested loop structure to use in this case is: <em>A "while" loop inside of a "for" loop</em>

<u>The outer loop</u>

First, you must iterate through each student.

This can be done using a for loop or a while loop.

However, it is faster to implement this kind of iteration on a for loop, than a while loop

So, the algorithm of the outer loop would look like the following:

<em>for student = 1 to 5 step 1</em>

<em />

<u />

<u>The inner loop</u>

Next, you must get input for the 5 grades for each student

After getting input for the grade of each student, a loop would be used to test if the input is valid.

The loop would be repeated until the user enters a valid input.

This can only be done using a while loop.

So, the algorithm of the inner loop would look like the following:

<em>input grade</em>

<em>while grade is invalid:</em>

<em>     input grade</em>

<em />

<em />

<em />

Hence, the nested loop structure to use is:

<em>A "while" loop inside of a "for" loop</em>

<em />

<em />

Read more about loops at:

brainly.com/question/11608024

You might be interested in
Firestick optimizing system storage and applications loop
fiasKO [112]

Answer:

IF THIS DOES OCCUR THEN THE SYSTEM WILL AUTOMATICALLY CUT OFF WITH NO WARNING AT ALL...

Explanation:

ON WHAT INFORMATION AND RESEARCH HAS GIVEN ME IT WILL BE THE  AWNSER GIVEN AT THE TOP...

7 0
2 years ago
The Open Systems Interconnection (OSI) is a conceptual model whose purpose is to make networks more manageable. Its objectives i
andrew-mc [135]

Answer:

A. data-link layer

Explanation:

Data-link layer is the first layer and allows a contiguous sequence of bits to be transmitted through the network.

On top of it is the Network Layer and it handles the task of routing network messages from one computer to another.

Then comes the Transport Layer which is the basic layer at which one network computer communicates with another network computer.

6 0
3 years ago
What is the car on the right?
oksano4ka [1.4K]

looks like a rxc custom gt3 with a v6 *badass sport car*

3 0
3 years ago
No spamming or links
Hitman42 [59]
I think the answer is true,
8 0
2 years ago
Read 2 more answers
What is the memory of a computer called
Nataliya [291]
It is called Ram in another term for memory :)
6 0
3 years ago
Read 2 more answers
Other questions:
  • What are pixels that are the exact same between multiple frames called?
    15·1 answer
  • 13. You're expecting an important call from Mr. Suarez, a potential customer. While waiting for this call, your supervisor calls
    15·1 answer
  • 4. True or False? Electrons flow out from the POSITIVE end of a battery. *<br> True<br> False
    7·1 answer
  • Software that instructs the computer how to run applications and controls the display/keyboard is known as the
    14·1 answer
  • 3. The term integration refers to the ability to
    6·1 answer
  • Assuming that we only support BEQ and ADD instructions, discuss how changes in the given latency of this resource affect the cyc
    7·1 answer
  • ______ is a slow process that takes place in nature. (2 points)
    8·1 answer
  • Betty set up an account on a popular social networking website. she wants to know whether the privacy policy is effective for he
    14·1 answer
  • Match each term in the second column with its correct definition in the first column. Write the letter of the term on the blank
    12·1 answer
  • 3. Choose the statement that best describes a ray. A ray extends forever in both directions. B ray is a part of a line with two
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!