Consider the given code fragment. Determine the output of the program fragment.m = 2 repeat until (m > 500) { display(m) m = m * 2 } a) 2, 4, 8, 16, 32, 64, 128, 256, 512 b) 2, 4, 8, 16, 32, 64, 128, 256 c) 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024 d) 2, 4, 8, 16, 32, 64, 128, 256, 1024

Answers

Answer 1
Answer:

Explanation:

a "repeat until" loop checks the criteria at the end of the loop.

but the sequence of the instructions inside the loop writes m before it gets increased (multiplied by 2).

so,

b) 2, 4, 8, 16, 32, 64, 128, 256

is correct, because at the end m = 256, it gets displayed, then m gets multiplied by 2 (now it is 512). and NOW the loop checks the end criteria (m > 500) and ends the loop.

so, the number 512 never gets displayed. and we are not getting to any larger number anyway.


Related Questions

MUST HELP FOR POINTS!!!!! HELP ME!!!!!!!!! I RLY NEED HELP ON THIS, plz give sincere answers that you truly believe are correct.Question 1 (Multiple Choice Worth 3 points)(03.02 LC)Integrity, positive attitude, and punctuality are considered __________ skills. interpersonal mathematical personal verbal Question 2 (Multiple Choice Worth 3 points)(03.02 LC)What is the ability to pay attention to and interpret what other people are saying? Collaboration Decision-making Listening Problem-solving Question 3 (Multiple Choice Worth 3 points)(03.02 MC)Devon keeps his commitments, submits work when it's due, and shows up when scheduled. What personal skill does Devon demonstrate? Attire Collaboration Dependability Verbal Question 4 (True/False Worth 3 points)(03.02 LC)Curfew is an example of a workplace policy. TrueFalseQuestion 5 (Multiple Choice Worth 3 points)(03.02 MC)A technology company only hires applicants who are under the age of 30. This company could face possible __________ consequences. academic gender legal technological
drag each item to the appropriate bin. if the item is not an input to or an output from the light reactions, drag it to the “not input or output” bin.
How can our perceptions help us to choose the channel for our message?
The word part attached to the beginning of a word root in order to modify its meaning is called a(n): A. Suffix B. Prefix C. Combining Form D. Infix
Having a positive work ethic means acceptingconstructive criticism even though it may bepainful. You should: (select all that apply)show a positive facial expression.maintain eye contactnot interrupt or speak until you are sure theother person is finished making a pointquestion the person frequently throughout theconversation

If a speaker is delivering a presentation using WebEx, which allows them to give a presentation from their computer to anyone at any location in the world, which speaking format is being used?a. Face-to-Face
b. Interpersonal
c. Distance
d. Mediated

Answers

Answer:

The answer is B, Interpersonal

Explanation:

Interpersonal format of communication is the exchange of information between two or more parties.

The characteristics of an interpersonal format includes

Active listening, Teamwork., Responsibility, Dependability, Leadership, Motivation, Flexibility.

Thus, in respect to the question asked, Interpersonal is the right answer.

If a student is looking for the degree symbol (°) and it is not found on the main drop-down of symbols, what should the student do next?The student should look for a shortcut to that symbol.
The student should click More Symbols.
The student should click Symbols.
The student should find the symbol on the keyboard.

Answers

Answer:

The student should click More Symbols.

Explanation:

The student is currently in the main drop-down of symbols, and yet can't find the desired symbol. The next step would be to go further and look deeper into the symbols drop-down which is done by clicking more symbols.

It is important to note that before the student want to the symbol drop-down, he/she should have already looked through the keyboard for the (°) symbol. It is only natural for troubleshooting for a problem to be progressive. The student goes further to check for (°) by clicking more symbols not going back to looking through the keyboard, looking for a shortcut to the symbol or clicking the symbol icon to bring up the main drop-down for symbols.

Therefore, the only option available is to click More Symbols.

D and A are definitely not the answer. I would say that the answer is B, the student should click More Symbols. 

What is not true about contracts?

Answers

If you sign a contract or official document with your non-dominant hand, you do not have to follow that agreement or set of rules

If you sign a contract or official document with your non-dominant hand, you do not have to follow that agreement or set of rules

What means to create an uncompressed copy of a compressed file or folder

Answers

A Compressed file is basically a collection of multiple files which is takes smaller disk space, so in order to get an uncompressed copy you will need to extract first the compressed file using the default extract function in windows or using a 3rd party application (i.e winrar / winzip)  to get the full collection and save it as it is.

The picture that graphically represents the items you use in Windows is called a/an

Answers

Icon need to use 20  characters 

An employee who interacts with customers regarding the nature of their car problems, rather than actually working on the vehicles, is called a

Answers

The answer to your question would be service writer. The service writer's job, is to log all information and such, and generally decide what happens.