write a program that keeps taking integers until the user enters in python

Answers

Answer 1

int main {

//variables

unsigned long num = 0;

std::string phrase = " Please enter your name for confirmation: " ;

std::string name;

//codes

std::cout << phrase;

std::cin>> name;

while ( serial.available() == 0 ) {

num++;

};

if ( serial.avaliable() > 0 ) {

std::cout << " Thank you for your confirmation ";

};

};


Related Questions

Using simplified language and numbers, using large font type with more spacing between questions, and having students record answers directly on their tests are all examples of _____. Group of answer choices universal design analytic scoring cheating deterrents guidelines to assemble tests

Answers

Answer:

universal design

Explanation:

Using simplified language and numbers, using large font type with more spacing between questions, and having students record answers directly on their tests are all examples of universal design.

Universal Design can be regarded as design that allows the a system, set up , program or lab and others to be

accessible by many users, this design allows broad range of abilities, reading levels as well as learning styles and ages and others to have access to particular set up or program.

it gives encouragment to the development of ICTS which can be

usable as well as accessible to the widest range of people.

5 Write full forms of the following: CPU b. MHz с. СВТ d. CAI e. ICU f. POS a. Write suitable technical term for the following statements. The continuously working capacity of computer without loos its speed and accuracy. b. The computer terminology, in which output is determined accord to the input The computer device used in hospitals that helps to main heartbeat of the patient. Opiemak The collection of eight bits or two Nibbles. C. I byte d. ng School Level Computer Science - 6​

Answers

Answer:

CPU = Central prossing Unit

What are the differences between sequential and random files? Which one do you think is better and why?

Answers

Answer:

Sequential is better

Explanation:

Sequential is more organized while the more easier to make but less dependable one is random.

sequential is used for things such as date of birth, or where someone was born.

you can't do that with a random file.

, , and angle x and angle y are both in the first quadrant.

Answers

Answer:

[tex]\tan(x+y) = 3.73[/tex]

Explanation:

The missing part of the question are:

[tex]\sin(x) = \frac{1}{2}[/tex]

[tex]\cos(y) = \frac{\sqrt 2}{2}[/tex]

Required

[tex]\tan(x + y)[/tex]

First, we calculate [tex]\sin(y)[/tex] and [tex]\cos(x)[/tex]

We have:

[tex]\sin^2(x) + \cos^2(x) = 1[/tex]

So:

[tex](1/2)^2 + \cos^2(x) = 1[/tex]

Collect like terms

[tex]\cos^2(x) = 1 - (1/2)^2[/tex]

[tex]\cos^2(x) = 1 - \frac{1}{4}[/tex]

Take LCM

[tex]\cos^2(x) = \frac{4-1}{4}[/tex]

[tex]\cos^2(x) = \frac{3}{4}[/tex]

Square roots of both sides

[tex]\cos(x) = \frac{\sqrt 3}{2}[/tex]

Similarly,

[tex]\sin^2(y) + \cos^2(y) = 1[/tex]

So:

[tex]\sin^2(y)+(\sqrt 2/2)^2 = 1[/tex]

[tex]\sin^2(y)+ (2/4) = 1[/tex]

[tex]\sin^2(y)+1/2 = 1[/tex]

Collect like terms

[tex]\sin^2(y) = 1 - 1/2[/tex]

Take LCM

[tex]\sin^2(y) = \frac{2 -1}{2}[/tex]

[tex]\sin^2(y) = \frac{1}{2}[/tex]

Square roots of both sides

[tex]\sin(y) = \frac{1}{\sqrt2}[/tex]

Rationalize

[tex]\sin(y) = \frac{\sqrt2}{2}[/tex]

So, we have:

[tex]\sin(x) = \frac{1}{2}[/tex]           [tex]\cos(x) = \frac{\sqrt 3}{2}[/tex]

[tex]\cos(y) = \frac{\sqrt 2}{2}[/tex]        [tex]\sin(y) = \frac{\sqrt2}{2}[/tex]

[tex]\tan(x) = \sin(x) \div \cos(x)[/tex]

[tex]\tan(x) = \frac{1}{2} \div \frac{\sqrt 3}{2}[/tex]

Rewrite as:

[tex]\tan(x) = \frac{1}{2} * \frac{2}{\sqrt 3}[/tex]

[tex]\tan(x) = \frac{1}{\sqrt 3}[/tex]

Rationalize

[tex]\tan(x) = \frac{\sqrt 3}{3}[/tex]

Similarly

[tex]\tan(y) = \sin(y) \div \cos(y)[/tex]

[tex]\tan(y) = \frac{\sqrt 2}{2} \div \frac{\sqrt 2}{2}[/tex]

[tex]\tan(y) = 1[/tex]

Lastly,

[tex]\tan(x + y)= \frac{\tan(x) + \tan(y)}{1 - \tan(x) \cdot \tan(y)}[/tex]

[tex]\tan(x + y)= \frac{\frac{\sqrt3}{3} + 1}{1 - \frac{\sqrt3}{3} \cdot 1}[/tex]

[tex]\tan(x + y)= \frac{\frac{\sqrt3}{3} + 1}{1 - \frac{\sqrt3}{3}}[/tex]

Combine fractions

[tex]\tan(x + y)= \frac{\frac{\sqrt3+3}{3}}{\frac{3 - \sqrt3}{3}}[/tex]

Cancel out 3

[tex]\tan(x + y)= \frac{\sqrt3+3}{3 - \sqrt3}[/tex]

Using a calculator

[tex]\tan(x+y) = 3.73[/tex]

Shawn's supervisor has tasked him with determining how the company can increase the security of its Wi-Fi. Shawn plans to present several options to his supervisor and ask her to check his work. Which of the following is not a strong security method? (Select TWO.)
a. Disabling SSID
b. WPS
c. MAC filtering
d. Setting encryption

Answers

Answer:

The not strong security methods are:

a. Disabling SSID

b. WPS

Explanation:

When you disable SSID, you only make your Wi-Fi secure for the less determined attackers.  By disabling the SSID (network name), those who are less technically inclined are prevented from connecting to the network but, this will not deter a more determined and technically savvy adversary.  The best two options are MAC filtering and setting encryption.  WPS (Wi-Fi Protected Setup) enables the process of connecting to a secure wireless network from a computer or other device easier instead of making it harder.

Skunkworks appeared to have ________ task interdependence, while the Levittown builder seemed to have ________ task interdependence. Multiple Choice comprehensive; sequential pooled; comprehensive reciprocal; pooled sequential; reciprocal pooled; reciprocal

Answers

The article upon which the question is based on:

The Skunk Works home page describes this team best: "What do the world’s first stealth aircraft, the world’s most advanced fighters, and the world’s fastest manned aircraft have in common? They were all imagined by ‘Skunks’—some of the most innovative, strategic, and visionary thinkers around." Kelly Johnson was permitted to build an experimental engineering department in 1943, and the rest is history. The small-staffed unit was organized by integrating designers with builders, working together so that ideas were buildable, with limited visitors allowed from the outside. The impressive results are many, including the U-2, the world’s first spy plane, and the SR-71 Blackbird, the world’s fastest, highest-flying aircraft.

Answer:

1. comprehensive

2. sequential

Explanation:

Skunkworks appeared to have COMPREHENSIVE task interdependence, while the Levittown builder seemed to have SEQUENTIAL task interdependence.

This is based on the idea that Skunkworks acknowledges the powers of interaction and coordination of team members and while Levittown builders work on gradual working arrangement as one input of part A becomes the input of part B, and it goes on.

1. For this assignment you will print the steps for 8-bit by 8-bit multiplication.
2. Your program should read in two unsigned numbers from stdin, the first being the multiplicand and the second being the multiplier. Your program should verify that both values are within the range 0 to 255. If not, the program should print an appropriate error message and exit.
3. Your program should then initialize the simulated registers and echo the input values in decimal and also in binary.
4. Then your program should illustrate the eight steps required for multiplication using the same type of step diagrams as given in the lecture notes.
5. Finally, your program should print a check section that shows a summary of the multiplication in binary as well as in decimal. See the example below.
6. You may write your program in C, C++, or Java. If you choose to work in C, here is an example function that will allow you to represent an n-bit value within an int data type and print out the binary value in "length" bits. It uses the shift right operator and the bitwise and. (You can also choose to use unsigned int as the data type; since you are using only the lower 8 of the 32 bits in an int, there will be no apparent difference between using int and using unsigned int. However, if you choose to use char as the data type, you should use unsigned char to ensure that the compiler generates logical rather than arithmetic shifts.)
void prt_bin( int value, int length ){
int i;
for( i=(length-1); i>=0; i--){
if((value>>i)&1)
putchar('1');
else
putchar('0');
}
}
For example, if you declare acc as an int, then you could call prt_bin(acc,8) to print the 8-bit value in the accumulator.
You should format your output to exactly match the output below. 10% of the grade will be awarded for following the same format.
Sample Run is given below:
multiplicand: 33
multiplier: 55
c and acc set to 0
mq set to multiplier = 55 decimal and 00110111 binary
mdr set to multiplicand = 33 decimal and 00100001 binary
---------------------------------------------------
step 1: 0 00000000 00110111
+ 00100001 ^ add based on lsb=1
----------
0 00100001 00110111
>> shift right
0 00010000 10011011
---------------------------------------------------
step 2: 0 00010000 10011011
+ 00100001 ^ add based on lsb=1
----------
0 00110001 10011011
>> shift right
0 00011000 11001101
---------------------------------------------------
step 3: 0 00011000 11001101
+ 00100001 ^ add based on lsb=1
----------
0 00111001 11001101
>> shift right
0 00011100 11100110
---------------------------------------------------
step 4: 0 00011100 11100110
+ 00000000 ^ no add based on lsb=0
----------
0 00011100 11100110
>> shift right
0 00001110 01110011
---------------------------------------------------
step 5: 0 00001110 01110011
+ 00100001 ^ add based on lsb=1
----------
0 00101111 01110011
>> shift right
0 00010111 10111001
---------------------------------------------------
step 6: 0 00010111 10111001
+ 00100001 ^ add based on lsb=1
----------
0 00111000 10111001
>> shift right
0 00011100 01011100
---------------------------------------------------
step 7: 0 00011100 01011100
+ 00000000 ^ no add based on lsb=0
----------
0 00011100 01011100
>> shift right
0 00001110 00101110
---------------------------------------------------
step 8: 0 00001110 00101110
+ 00000000 ^ no add based on lsb=0
----------
0 00001110 00101110
>> shift right
0 00000111 00010111
---------------------------------------------------
check: binary decimal
00100001 33
x 00110111 x 55
---------------- ------
0000011100010111 1815

Answers

Answer:

Code:

#include<bits/stdc++.h>

using namespace std;  

char* prt_bin( int value, int length, char s[]){

   for(int i=(length-1); i>=0; i--){

     if((value>>i)&1) {

       s[length-1-i] = '1';  

       // putchar('1');

     }

     else {

       s[length-1-i] = '0';  

       // putchar('0');

     }

   }

   s[length] = '\0';

   return s;

}  

int main(){

     int nbits = 8, c, acc;

     char s[nbits+1];

    int multiplicand, multiplier, mq, mdr;  

   cout<<"Multiplicand: ";

   cin>>multiplicand;

   cout<<"Multiplier: ";

   cin>>multiplier;

 

    if(multiplier<0 || multiplier>255 ||multiplicand<0 || multiplicand>255){

    cout<<"Given Multiplicand or multiplier is incorrect. Exiting the program.\n";

       return 0;

   }  

   c = 0; acc = 0;

      cout<<"c and acc set to 0\n";

   mq = multiplier;

   mdr = multiplicand;

   cout<<"mq set to multiplier = "<<multiplier<<" decimal and "<<prt_bin(multiplier, nbits, s)<<" binary\n";

   cout<<"mdr set to multiplicand = "<<multiplicand<<" decimal and "<<prt_bin(multiplicand, nbits, s)<<" binary\n";

   

   printf("---------------------------------------------------\n");

    for(int i=1;i<=nbits;i++){

       printf("step %d: %d %s ",i, c, prt_bin(acc, nbits, s));

       printf("%s\n",prt_bin(mq, nbits, s));

       char lsb = s[nbits-1];  

       if(lsb=='1'){  

           printf("     + %c %s    ^add based on lsb=%c\n", c, prt_bin(mdr, nbits, s), lsb);

           printf("      ----------\n");

           acc = acc + multiplicand;

       }  

       else{

           printf("     + %c %s    ^no add based on lsb=%c\n", c, prt_bin(0, nbits, s), lsb);

           printf("      ----------\n");

       }  

       printf("      %d %s ", c, prt_bin(acc, nbits, s));

       printf("%s\n",prt_bin(mq, nbits, s));  

       printf("     >>          shift right\n");  

       mq = mq>>1;  

       if(acc%2==1){

           mq = mq+128;

       }  

       acc = acc>>1;  

       printf("      %d %s ", c, prt_bin(acc, nbits, s));

       printf("%s\n",prt_bin(mq, nbits, s));  

       printf("---------------------------------------------------\n");

   }  

   char sr[nbits*2+1];  

   printf("check:              binary   decimal\n");

   printf("                 %s        %d\n", prt_bin(multiplicand, nbits, s), multiplicand);

   printf("       x         %s  x     %d\n", prt_bin(multiplier, nbits, s), multiplier);

   printf("          ----------------    ------\n");

   printf("          %s      %d\n", prt_bin(multiplier*multiplicand, nbits*2, sr), multiplier*multiplicand);

   return 0;

}

I have a variable and set it equal to 5. 1 then send it as an argument to a function that adds 5 to the variable passed in. Outside the function print the variable (after the function executes).
What will it print?
A. 5+1
B. 4
C. 6
D. 5

Answers

Answer:

D. 5

Explanation:

If the variables original value was 5 then the value that will be printed is 5. This is because the variable is being passed as a parameter into the function and 5 is being added to the parameter value, not the actual global variable outside. Therefore, in order for the adjusted value to be printed then that new value that is returned by the function needs to be saved in a new variable. This can be seen in the example code below.

Write a program to print all odd numbers between 20 and 50(Qbasic)​

Answers


Source Code:

total = 0

FOR x = 20 TO 50 STEP 2
total = total + x
NEXT x

PRINT "Total=";total

Does the estimate of a tolerance level of 68.26% of all patient waiting times provide evidence that at least two-thirds of all patients will have to wait less than 8 minutes?

Answers

Answer:

Yes, because the upper limit is less Than 8 minutes

Explanation:

According to the empirical formula :

68.26% of data lies within 1 standard deviation from the mean;

Hence,

Mean ± 1(standard deviation)

The sample mean and sample standard deviation of the given data is :

Sample mean, xbar = Σx / n = 546 / 100 = 5.46

Sample standard deviation, s = 2.475 (Calculator)

The interval which lies within 68.26% (1 standard deviation is) ;

Lower = (5.460 - 2.475) = 2.985

Upper = (5.460 + 2.475) = 7.935

(2.985 ; 7.935)

Since the interval falls within ; (2.985 ; 7.935) whose upper level is less than 8 means patients will have to wait less Than 8 minutes.

You are the network administrator for the ABC Company. Your network consists of two DNS servers named DNS1 and DNS2. The users who are configured to use DNS2 complain because they are unable to connect to internet websites. The following shows the configuration of both servers:

Server Configurations:

DNS1: _msdcs.abc.comabc.com
DNS2: .(root)_msdcs.abc.comabc.com

The users connected to DNS2 need to be able to access the internet. What should be done?

Answers

Answer:

ABC Company

The action to take is to:

Delete the .(root) zone from the DNS2.  Then configure conditional forwarding on the DNS2 server.  If this is not done, the users will be unable to access the internet.

Explanation:

DNS forwarding enables DNS queries to be forwarded to a designated server, say DNS2, for resolution according to the DNS domain name.  This stops the initial server, DNS1, that was contacted by the client from handling the query, thereby improving the network's performance and resilience and enabling the users to be connected to the DNS2 in order to access the internet.

#Write a function called find_median. find_median #should take as input a string representing a filename. #The file corresponding to that filename will be a list #of integers, one integer per line. find_median should #return the medi

Answers

Answer:

Explanation:

The following is written in Python. It takes in a file, it then reads all of the elements in the file and adds them to a list called myList. Then it sorts the list and uses the elements in that list to calculate the median. Once the median is calculated it returns it to the user. The code has been tested and the output can be seen in the image below.

def find_median(file):

   file = open(file, 'r')

   mylist = []

   for number in file:

       mylist.append(int(number))

   numOfElements = len(mylist)

   mylist.sort()

   print(mylist)

   if numOfElements % 2 == 0:

       m1 = numOfElements / 2

       m2 = (numOfElements / 2) + 1

       m1 = int(m1) - 1

       m2 = int(m2) - 1

       median = (mylist[m1] + mylist[m2]) / 2

   else:

       m = (numOfElements + 1) / 2

       m = int(m) - 1

       median = mylist[m]

   return median

print("Median: " + str(find_median('file1.txt')))

Mario is giving an informative presentation about methods for analyzing big datasets. He starts with the very basics, like what a big dataset is and why researchers would want to analyze them. The problem is that his audience consists primarily of researchers who have worked with big data before, so this information isn’t useful to them. Which key issue mentioned in the textbook did Mario fail to consider?

Answers

Answer:

Audience knowledge level

Explanation:

The Key issue that Mario failed to consider when preparing for her presentation is known as Audience knowledge level.  

Because Audience knowledge level comprises educating your audience with extensive information about the topic been presented. she actually tried in doing this but she was educating/presenting to the wrong audience ( People who are more knowledgeable than her on the topic ). she should have considered presenting a topic slightly different in order to motivate the audience.

A new PKI is being built at a company, but the network administrator has concerns about spikes of traffic occurring twice a day due to clients checking the status of the certificates. Which of the following should be implemented to reduce the spikes in traffic?
A. CRL
B. OCSP
C. SAN
D. OID

Answers

Answer:

Option A (CRL) is the right answer.

Explanation:

Certificates with respective expiration date canceled mostly by CA generating or providing them, then it would no longer be tolerated, is considered as CRL.CRL verification could be more profitable for a platform that routinely manages several clients, all having pronouncements from a certain CA, because its CRL could be retrieved once per day.

Other given choices are not connected to the given scenario. So Option A is the right one.

The trackpad/touchpad on my laptop is acting unusual. When I click on something or move to an area, it jumps or moves to another area. What would be a good troubleshooting step to try and resolve this issue?

a. Use a mouse instead

b. Remove all possible contact points, and test again while ensuring only a single contact point

c. Refer caller to user guides

d. increase the brightness of the display

Answers

Answer:

My best answer would be, "b. Remove all possible contact points, and test again while ensuring only a single contact point"

This is because usually when the cursor jumps around without reason, it's caused by the user accidentally hitting the mouse touchpad on his or her laptop while typing. ... Similarly, know that just because you have an external mouse attached to your laptop, the built-in mousepad is not automatically disabled.

Brainliest?

what is the difference between system software and application software

Answers

Explanation:

System software is meant to manage the system resources. It serves as the platform to run application software. Application software helps perform a specific set of functions for which they have been designed. Application software is developed in a high-level language such as Java, C++, .

Explanation:

Hope it's the write answer

what is incremental development and its importance in a project

Answers

Answer:

Incremental development in software engineering is a process methodology that emphasizes the virtue of taking small steps toward the goal.

Explanation:

Rather than delaying feedback until final delivery when time and resources have already been spent, incremental development ensures that teams can use feedback to make changes early and often.

The main importance of the Incremental model is that it divides the software development into submodules and each submodule is developed by following the software development life cycle process SDLC like Analysis, Design, Code, and Test.

Answer:

 incremental development is any combination of both iterative design or iterative method and incremental build model for development

Explanation:

importance

Incremental development ensures that developers can make changes early on in the process rather than waiting until the end when the allotted time has run out and the money has been spent.

An incremental approach breaks the software development process down into small, manageable portions known as increments. Each increment builds on the previous version so that improvements are made step by step

Write a class of complex numbers consisting of:
-Properties:
• Real part of type double;
• Virtual part of type double.
- Method:
• default constructor, 2-parameter constructor;
• Full setter, getter for each variable;
• the print() function prints SoPhuc as a string in the format a + bi, where a is the real part, b is the imaginary part
-Write main() function:
• Create 2 SoPhuc objects
• Use class methods to enter information for 2 objects
• Use print() method to print information of 2 objects that have been created

Answers

Answer:

hi sorry for not knowing the answer

but please follow have a great day,night, or afternoon

What type of program allows a user to copy or back up selected files or an entire hard disk to another storage medium?

Answers

Answer:

backup utility

Explanation:

What hardware architectures are not supported by Red Hat?

Answers

It should be Macintosh I hope this help let me know if you have any questions

Analyzing the role of elements in audio editing and Video
+ analyzing the role of the visual element in Video + analyzing the role of text factor
+ analyzing the role of the audio factor
+ analyzing the role of the transfer scene
+ analysing the role of the audio visual effects

Answers

Answer:

Analyzing the role of elements in audio editing and Video

+ analyzing the role of the visual element in Video + analyzing the role of text factor

+ analyzing the role of the audio factor

+ analyzing the role of the transfer scene

+ analysing the role of the audio visual effect

Write an algorithm to solve general formula? ​

Answers

Answer:

2+2=4

Explanation:

simple math cause of that bubye

Is" Python programming Language" really
worth studying? If yes? Give at least 10 reasons.

Answers

1. Python is a particularly lucrative programming language

2. Python is used in machine learning & artificial intelligence, fields at the cutting-edge of tech

3. Python is simply structured and easy to learn

4. Python has a really cool best friend: data science dilemma.

5. Python is versatile in terms of platform and purpose

6. Python is growing in job market demand

7. Python dives into deep learning

8. Python creates amazing graphics

9. Python supports testing in tech and has a pretty sweet library

10. There are countless free resources available to Python newbies

If you lose yellow from your printer, what would happen to the picture?

Answers

Answer:

The picture would be green.

Describe the system unit​

Answers

Answer:

A system unit is the part of a computer that houses the primary devices that perform operations and produce results for complex calculations

various gabs in the digital divide​

Answers

Answer:

factors such as low literacy and income level Geographical restriction lack of motivation motivation of the technology lack of motivation to use technology and digital illiteracy and contribute to the digital device

A life insurance salesperson who takes advantage of the foot-in-the-door phenomenon would be most likely to:________
a. emphasize that his company is one of the largest in the insurance industry.
b. promise a free gift to those who agree to purchase an insurance policy.
c. address customers by their first names.
d. ask customers to respond to a brief survey of their attitudes regarding life insurance.

Answers

Answer:

d. ask customers to respond to a brief survey of their attitudes regarding life insurance.

Explanation:

A life insurance policy can be defined as a contract between a policyholder and an insurer, in which the insurer agrees to pay an amount of money to a specific beneficiary either upon the death of the insured person (decedent) or after a set period of time.

A salesperson (sales representative) refers to an individual or employee who is saddled with the responsibility of taking orders from customers, as well as selling finished goods and services to consumers or end users.

A foot-in-the-door phenomenon can be defined as a compliance (persuasive) technique or tactics that assumes a person agreeing to perform a small request increases the likelihood of he or she agreeing to a subsequent larger request. Thus, it posits that when a person agrees to a small, it makes it difficult for him or her to decline a second, larger (bigger) request.

In this context, a life insurance salesperson who takes advantage of the foot-in-the-door phenomenon would most likely ask his or her customers to respond to a brief survey of their attitudes regarding life insurance.

Which of the following acronyms refers to a network or host based monitoring system designed to automatically alert administrators of known or suspected unauthorized activity?
A. IDS
B. AES
C. TPM
D. EFS

Answers

Answer:

Option A (IDS) is the correct choice.

Explanation:

Whenever questionable or unusual behavior seems to be detected, another alarm is sent out by network security equipment, which would be considered as Intrusion Detection System.SOC analysts as well as occurrence responders can address the nature but instead, develop a plan or take steps that are necessary to resolve it predicated on such notifications.

All other three alternatives are not related to the given query. So the above option is correct.

Compute the acceleration of gravity for a given distance from the earth's center, distCenter, assigning the result to accelGravity. The expression for the acceleration of gravity is: (G * M) / (d2), where G is the gravitational constant 6.673 x 10-11, M is the mass of the earth 5.98 x 1024 (in kg) and d is the distance in meters from the earth's center (stored in variable distCenter).
#include
using namespace std;
int main() {
double G = 6.673e-11;
double M = 5.98e24;
double accelGravity;
double distCenter;
cin >> distCenter;
/* Your solution goes here */
cout << accelGravity << endl;
return 0;
}

Answers

Answer:

Replace /* Your solution goes here */ with the following expression

accelGravity = (G * M) / (distCenter *distCenter );

Explanation:

Required

Complete the code

The equivalent expression of (G * M) / (d^2) is:

(G * M) / (distCenter *distCenter );

The expression must be stored in accelGravity.

So, we have:

accelGravity = (G * M) / (distCenter *distCenter );

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 grades, 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

Answers

The type of nested loop which I would use to write the program is:

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

What is a Loop?

This refers to the control flow statement which is used to iterate and lets a particular line(s) of code execute repeatedly

With this in mind, we can see that the type of nested loop which I would use to write the program is a "while" loop inside of a "for" loop because it is a conditional statement that continues to ask for the certain valid grades until it gets the right one.

Therefore, the correct answer is option B

Read more about loops here:
https://brainly.com/question/26098908

Other Questions
Vt nh c nm ln t im A trn mt t vi vn tc u 20m/s theo phng thng ng. Xc nh cao ca im O m vt t c. B qua ma st You flip a coin that is not fair, the prbability of heads on each flip is 0.7. if the coin shows heads, you draw a marble from urn h with 1 blue and 4 red marbles. if the coin shows tails, you draw a marble from urn t with 3 blue and 1 red marble. Find the following probabilities:a. The probability of choosing a red marble. b. The probability of choosing a blue marble, given that the coin showed heads. c. The probability that the coin showed tails, given that the marble was red. Alejandro wants to adopt a puppy from an animal shelter. At the shelter, he finds eight puppies that he likes: a male and female puppy from each of the four breeds of and Labrador. The puppies are each so cute that Alejandro cannot make up his mind, so he decides to pick the dog randomly. Find the probability that Alejandro chooses a . Why is avian influenza (H5 N1) rarely transmitted from poultry to humans? Why is it is often lethalin humans? Why is it rarely spread from person to person? el Conde de Montecristo Fire suppression has been an official management policy in a variety of Northern Ghana ecosystems. Discuss examples of how this has impacted community composition. Describe how these examples are either consistent or inconsistent with the predictions of the Intermediate Disturbance Hypothesis. Be sure to take into account various aspects of the disturbance regime (e.G. Frequency and intensity). Which level of organization includes all the other levels of organization? Can u help me solve this A DNA fragment is introduced into the lacZ gene of a plasmid, which also contains an ampicillin resistance gene. What is the appearance of bacteria transformed with this plasmid if they are spread on plates containing ampicillin and X-gal Arrange these steps of creating a presentation in the correct order.Writing the Declaration of IndependenceIncreasing demands on the Americancolonies by the King of EnglandDeveloping the US Constitution Some 10-13 year olds were asked where to buy snacks. If 12% or 24 children, said a convenience store, how many children were asked to buy snacks? Yall plss plss help me, it super ugent, Ill mark the brainlest Plsssssss, it Imp not spamming,, Im serious Ill report u Use the given information to find the number of degrees of freedom, the critical values 2L and 2R, and the confidence interval estimate of . It is reasonable to assume that a simple random sample has been selected from a population with a normal distribution. Nicotine in menthol cigarettes 99% confidence; n=23, s=0.28 mg.df = (Type a whole number.)2L = (Round to three decimal places as needed.)2R = (Round to three decimal places as needed.)The confidence interval estimate of is __ mg < < __ mg. (Round to two decimal places as needed.) Finding the missing length in a figure At the beginning of the year, a company had accounts receivable of $700,000 and an allowance for doubtful accounts with a credit balance of $60,000. During the current year, sales on account were $195,000 and collections on account were $115,000. Also during the current year, the company wrote off $11,000 in uncollectible accounts. At year-end, an analysis of outstanding accounts receivable indicated that the allowance for doubtful accounts should have a $72,000 credit balance so the company records the appropriate year-end adjusting entry. How much did the cash realizable value change during the current year Prepare a project report on various samples of a) a mixture b) a compound c) an element (metal or nonmetal) Which of the following are wholesale and which are retail? (a ) large-scale deposites made by Firms at negotiated rates of in interest. ...........(retail to wholesales) (b) Loans made by high Street banks at published rates of interest........ (retail (wholesales) (c) Deposite in savings accounts high street banks .................(retail /wholesales)(d) Deposite in savings accounts in building Societies ............. (retail/Wholesale)(e) Large-scale loans to industry syndicated through several banks........... (retail/ Wholesale) how long did it take for the thirteenth amendment to be ratified by state legislators after it was passed by congress As the number of multinational corporations continues to grow, we are experiencing a greater number of international ethical dilemmas. One very real concern has been the human rights abuses in sweatshops in exchange for cheap labor. Several retailers have now banded together to set ethical standards in foreign factories. Which statement summarizes the challenges of companies doing business in developing countries and the concerns of their customers A drink that contains 4 1/2 ounces of a proof liquor approximately how many drinks does this beverage contain?