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
Which formula is properly constructed
kirill115 [55]

Answer:

Option 4 is correct ,=(B2+C9)

Explanation:

In excel a formula starts with an equal sign followed by the expression.

In first option the formula is incorrect inside the brackets. where 4 is equating to bracket. In 2nd option opening and closing brackets are not same. First closing bracket is missing an opening bracket. In third option all the formula is correct except the part where # is used in formula. Hash tags cannot be used in formula as a value. Here in option D  B2 and C9 are cell in excel, whereas parentheses are only used for better readability.

7 0
3 years ago
Meaning of sperm count
yulyashka [42]

a measure of the number of spermatozoa per ejaculation or per measured amount of semen, used as an indication of a man's fertility.


5 0
3 years ago
Read 2 more answers
Three types of common program errors are syntax, runtime, and logic. (5 points)
adoni [48]

Answer:

True

Explanation:

3 0
3 years ago
Read 2 more answers
Q10: You cannot rename a compressed folder.
user100 [1]
<h2>Answer:</h2><h2>Oh yes you can. </h2>

Click slowly twice the folder.

Right click and choose rename.

4 0
3 years ago
Why do the digital animations begin as sketches drawn by hand?
svet-max [94.6K]
To get a sense as to what they are doing. They have to draw frame after frame after frame. Go back and fix it up. It's easier to draw on paper than use a mouse.
8 0
3 years ago
Other questions:
  • What year did bill gates form traf-o-data?
    8·1 answer
  • Which of the acronyms listed below refers to a series of basic hardware diagnostic tests performed by the startup BIOS after the
    13·1 answer
  • Word Online works exact same as the downloaded Office 2016 version.<br>True<br>False​
    7·1 answer
  • When might an lcd monitor experience distorted geometry?
    7·1 answer
  • The idea that innovations in transportation and communication technologies has changed the way we think about distance and time
    9·1 answer
  • Select the correct answer from each drop-down menu. Look at Marta's email signature and fill in the missing elements. Marta D'Ab
    14·2 answers
  • End users have complained that when they click a link on your company's Website, the wrong client loads. You review the page wit
    11·1 answer
  • What term is used to refer to the requesting of information from a database?
    10·2 answers
  • Examples of email prividers​
    6·2 answers
  • In the bremmer article, the author states that _________ translates into greater risks.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!