|Get Selected Weeks Solution with ONLY||NOT||Add Selected Tutorials To Cart|
Write a 200- to 300-word short-answer response to the following:
· There are 3 kinds of loops—for loop, while loop, and do while loop. Under which circumstances would each kind of loop be more appropriate? Explain your answers using specific examples.
This is Detailed answer for PRG 420 Discuss Questions-Week 4
Compare and contrast the WHILE loop and the FOR loop. The main difference between a WHILE loop and a FOR loop is that a FOR loop is guaranteed to finish, but a WHILE loop is not. The FOR statement specifies the exact number of times the loop executes, unless a statement causes the routine to exit the loop. With