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
Ostrovityanka [42]
3 years ago
10

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?
A. A "for" loop inside of a "while" loop
B. A "while" loop inside of a "for" loop
C. None of the above
D. Either a or b would work
Computers and Technology
1 answer:
OLEGan [10]3 years ago
5 0

Answer:

B. A "while" loop inside of a "for" loop

Explanation:

To enter 5 grade values, a for loop can be used to specify the number of grade values to be entered by the user, in other to ensure the validity of the grade values entered by the user, the while loop will be used inside the for loop such that the inputted values will only be accepted when the user enters a valid grade.

Code structure :

For a in range(0, 5) :

grade = input()

while grade (enter condition)

This is just the code structure and this will work for the problem stated.

You might be interested in
What is the name of this tool and what can it be used for?<br> Thanks!!
Iteru [2.4K]
That is a corqet tool it is used for fixing tires
6 0
3 years ago
What is known as the global network of computers?
Rudik [331]

Answer:

b. internet

Explanation:

cuz just b

7 0
2 years ago
Read 2 more answers
Which line in the following program will cause a compiler error?
777dan777 [17]

Answer:

The answer to this question is the option "A".

Explanation:

In the given c++ program the compile-time error occurs in line number 8.   In this program if block is used as an integer variable for checking condition that is number is greater then equal 0 and less then equal to 100 this is wrong.

So, the correct code for check if the block condition can be given as:

if (number>=0 && number<=100)

If we use this code in the if block section then the output of the question is passed.

6 0
3 years ago
How did the police respond to protestors at the democratic national convention in 1968
777dan777 [17]
The police attacked the protestors and innocent bystanders
5 0
3 years ago
Read 2 more answers
Which choice best describes the purpose of the Bcc e-mail message component??
timama [110]
The only purpose for bcc is to allow someone else to receive a copy without the intended receiver knowing
6 0
4 years ago
Other questions:
  • A size of a jumbo candy bar with rectangular shape is l x w x h. Due to rising costs of cocoa, the volume of the candy bar is to
    9·1 answer
  • The left column values in a table array are called table ____
    13·1 answer
  • ________ are devices in a computer that are in either the on or off state
    14·1 answer
  • When seeking information on the Internet about a variety of subjects, the most
    7·2 answers
  • Which statistical function in a spreadsheet helps you to see how far each number varies, on average, from the average value of t
    5·1 answer
  • Which of the following keywords is used to remove a row in a table? (Points : 2) DROP
    11·1 answer
  • Suppose that in a 00-11 knapsack problem, the order of the items when sorted by increasing weight is the same as their order whe
    8·1 answer
  • Which picture should i put as my profile picture.
    15·2 answers
  • A single-user/single-tasking operating system allows only one user to perform one task at a time. A real-time operating system g
    13·1 answer
  • The ______ clause allows us to select only those rows in the result relation of the ____ clause that satisfy a specified predica
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!