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]
2 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]2 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 sum after the following loop terminates? int sum = 0; int item = 0; do { item ; sum = item; if (sum > 4) break; } whi
irinina [24]
Int sum = 0;
int item = 0;
do
{
    item;
    sum = item;
    if (sum > 4)
        break;
} while (item < 5);


You will generate a compile error, as having (item;) as a statement on its own is invalid.
8 0
3 years ago
Read 2 more answers
What kind of goal does ariel set when he works to graduate from high school in four years? short term long term normative fantas
mash [69]

The type of goal that Ariel will set so that she can be able to works to graduate from high school is  one that has to be long term.

<h3>What are personal goals ?</h3>

These kind of goals are known to be things or items that a person is hoping on getting or achieving.

Therefore,  the type of goal that Ariel will set so that she can be able to works to graduate from high school is  one that has to be long term as it will be one that will last for a very long time.

Learn more about goals from

brainly.com/question/1512442

#SPJ4

5 0
1 year ago
Which one of the following downloads and uploads files to and from a server? A. Client B. Internet protocol C. Server D. Worksta
earnstyle [38]
The answer is A. Client request and receive files to and from a server.
5 0
2 years ago
Which statement in main() generates an error?
Sunny_sXe [5.5K]

Answer:

C. leagueName=newPlayers.getLeague(); getLeague() is not a member of Players.

Explanation:

The main method in this code will case an error when trying to run the following line of code...

leagueName=newPlayers.getLeague();

This is because the method getLeague() is being called on a Player object which takes all of its methods from the Player class. Since getLeague() is not a method located in the player class then it cannot be called by an object from that class. Especially since the Player class does not extend to the SoccerPlayers class where the getLeague() method is actually located. Instead, it is the SoccerPlayers class which extends the Players class as its parent class.

3 0
2 years ago
Which of the following is true about ethical issues in graphic design?
Basile [38]

Answer: The Answer Is B

Explanation:

I Did It On Edge

3 0
2 years ago
Read 2 more answers
Other questions:
  • It is okay to use a dust rag when cleaning the inside of a computer.
    9·2 answers
  • An undesirable jagged appearance is referred to as
    7·2 answers
  • In some cases, certain Hyper-V guest operating system features do not function properly using the operating system's own device
    9·1 answer
  • Technician A says that front and rear U-joints on a RWD axle should operate at different angles to prevent vibration. Technician
    10·1 answer
  • Note: the println() function prints out a line of text with the value that you pass to it - so if you say println("Hi"), it will
    5·1 answer
  • after placing her insertion point after grandma's kitchen, order the steps Danica needs to follow to insert and format the regis
    12·2 answers
  • For a new version of processor, suppose the capacitive load remains, how much more energy will the processor consume if we incre
    12·1 answer
  • Join zoom meet <br>id=547 458 9345<br>pw=sencHURI​
    8·2 answers
  • ____________ reference is used when you want to use the same calculation across multiple rows or columns.
    10·2 answers
  • Edhesive in JAVA Write a method that takes a String parameter. If the String has a double letter (i.e. contains the same letter
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!