1,660
29
Essay, 2 pages (300 words)

Research assignment

List three examples that show when a count-controlled loop is better than condition-controlled loop in programming? 1 . It keeps a count of the number of times you want to use the program to input data 2. It only runs as many times as you have instructed the program to run 3. It will stop after the allotted time it has been instructed to 2. List three examples that show when a condition-controlled is better than count-controlled loop in programming? 1.

The variable can be ore than one number.. As long as the statement is true 2. Condition-controlled will stop so long has reached the directed variable 3. The variables numbers can be any real number which will make the statement true Unit 8 Assignments: Short Answer: 6. What is an infinite loop? An infinite loop is a sequence of instructions in a computer program which loops endlessly, either due to the loop having no terminating condition, having one that can never be met, or one that causes the loop to start over. M x as integer do until> 5 loop 7. A For loop looks like what other loop in a flowchart? Step 1 – Is the condition true? Yes or No Step 2 – If Yes then execute the code and repeat step 1. If No then don’t execute the code and don’t repeat step 1. Continue to whatever the next step is. 8. Why is it critical that accumulator variables are properly initialized? If it isn’t, then you don’t know for sure what value it will start at in some languages. Your count will be inaccurate.

In other languages, it will just generate an error if you forget to initialize. 9. What is the advantage of using a sentinel? It allows implementation to be shifted from the list to the nodes themselves. 10. Why must the value chosen for use as a sentinel be carefully selected? The value must be unique enough that it will not be mistaken as a regular value in the list.

Thank's for Your Vote!
Research assignment. Page 1
Research assignment. Page 2
Research assignment. Page 3

This work, titled "Research assignment" was written and willingly shared by a fellow student. This sample can be utilized as a research and reference resource to aid in the writing of your own work. Any use of the work that does not include an appropriate citation is banned.

If you are the owner of this work and don’t want it to be published on AssignBuster, request its removal.

Request Removal
Cite this Essay

References

AssignBuster. (2022) 'Research assignment'. 18 October.

Reference

AssignBuster. (2022, October 18). Research assignment. Retrieved from https://assignbuster.com/research-assignment/

References

AssignBuster. 2022. "Research assignment." October 18, 2022. https://assignbuster.com/research-assignment/.

1. AssignBuster. "Research assignment." October 18, 2022. https://assignbuster.com/research-assignment/.


Bibliography


AssignBuster. "Research assignment." October 18, 2022. https://assignbuster.com/research-assignment/.

Work Cited

"Research assignment." AssignBuster, 18 Oct. 2022, assignbuster.com/research-assignment/.

Get in Touch

Please, let us know if you have any ideas on improving Research assignment, or our service. We will be happy to hear what you think: [email protected]