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
La computadora es un medio de comunicacion moderno?
kolbaska11 [484]
Moderno = mordern, if It does than yes!
3 0
3 years ago
There are a few simple rules that you can follow to store and manage files and folders in your computer. What is the most import
Nitella [24]
You should avoid deleting the unknown files to store your personal files and folders because if you delete that files it may be critical position with computer.
8 0
3 years ago
Read 2 more answers
The database cannot be migrated to a different engine because sql server features are used in the application’s net code. The co
Nezavi [6.7K]

Answer:

Explanation:

B is correct

3 0
2 years ago
What does aperture control? A)amount of light the image sensor captures when taking a photo. B)how sensitive the camera is to in
My name is Ann [436]

Answer:

How sensitive the camera is to incoming light.

Explanation:

8 0
3 years ago
Read 2 more answers
python. create a program that asks the user to input their first name and their favorite number. Then the program should output
blondinia [14]

name = input("What is you name?")

fav_number = input("What is you favorite number?")

print(name + " your favorite number is " + fav_number + "!")

7 0
3 years ago
Other questions:
  • Computers spend most of their time in loops, so multiple loop itera- tions are great places to speculatively find more work to k
    10·1 answer
  • Jenny is working on a laptop computer and has notices that the computer is not running very fast. She looks and realizes that th
    6·2 answers
  • Phoebe has to give a permission about recycling. Where should she look while presenting?
    11·1 answer
  • What are some good websites i can use to test my knowledge?
    11·2 answers
  • Why laptop computer is called micro computer?​
    8·1 answer
  • Explain the difference between the legal protections a security officer enjoys and the legal protections a police officer receiv
    12·2 answers
  • Sami is creating a web page for her dog walking business. Which item will set the theme for her page? Background color Heading c
    9·1 answer
  • A ____ is a statement specifying the condition(s) that must be true before the function is called.
    6·1 answer
  • What do you do when you have computer problems? Check all that apply. PLEASE HELP
    9·2 answers
  • Besides your computer, where else can you find and use an operating system?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!