2,027
14
Essay, 2 pages (400 words)

Computer science chapter

Turn of the computer, or do something physically that causes the program to stop working. Also, stack overflow may occur, but technically if an infinite loop is stopped by such an event it’s not really infinite 5. What distinguishes a Loop control construct from a While control construct, In terms of what Is known about the number of times the block of code will be repeated? The loop statement will continue to run until a certain condition is met, and the while statement will continue to run while a certain condition is still true.

You can tell the umber of times a loop statement will repeat itself, while you are unable to tell for the while statement. 6. Conditional expressions used in a While statement have the same components as conditional expression used In what other control construct? Boolean 7. Although In some programs a While statement should be Infinite. In most programs a While statement should eventually end. How can you make sure that a While statement will eventually end? Make sure the condition will become false eventually 8. Is it possible that the instructions within a While statement might never be executed at all?

Give an example, Yes. The condition might be false before the while statement Is even executed. For example, If a while statement only works If an object is 3 meters away from another object, and the distance between the two objects Is 4, the while statement will not execute. 9. If an Alice world contains six penguin objects, is it necessarily the case that the six penguins are items in a list of penguins? Explain your answer. No. You must put them inside a list yourself. Until then they are individual objects 10. What is the purpose of creating a list of similar Items in a aerogram?

It Is more convenient If you want all of the objects to execute a certain method at the same time or In order. 11. For the programmer, what Is the advantage in using a list in a program? You don’t have to retype code every time you want something to be executed 12. The list examples in Chapter 7 illustrate lists where the items are all objects. What other types of items could have been used? Numbers and strings can also be put in a list 13. Which control construct Is used to iterate through a list of Items In sequence? For all In order once)?

Thank's for Your Vote!
Computer science chapter. Page 1
Computer science chapter. Page 2
Computer science chapter. Page 3

This work, titled "Computer science chapter" 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) 'Computer science chapter'. 26 September.

Reference

AssignBuster. (2022, September 26). Computer science chapter. Retrieved from https://assignbuster.com/computer-science-chapter/

References

AssignBuster. 2022. "Computer science chapter." September 26, 2022. https://assignbuster.com/computer-science-chapter/.

1. AssignBuster. "Computer science chapter." September 26, 2022. https://assignbuster.com/computer-science-chapter/.


Bibliography


AssignBuster. "Computer science chapter." September 26, 2022. https://assignbuster.com/computer-science-chapter/.

Work Cited

"Computer science chapter." AssignBuster, 26 Sept. 2022, assignbuster.com/computer-science-chapter/.

Get in Touch

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