Software Engineering
Accenture PrimermediumSoftware Engineering04 Looping Statements

Accenture Software Engineering Practice Question

It's Halloween. You go from house to house, tricking or treating. You get 2 candies from each house that you go to. You must return home once you collect 100 candies. Can you arrange the sequence for this loop activity. 1 BEGIN 2 SET candy count <- 0 3 END WHILE 4 DECLARE candy_count 5 WHILE candy_count<=100 6 candy count <- candy_count+2 7 END a. 1 4 2 5 6 3 7 b. 1 2 4 3 6 5 7 c. 1 4 2 3 6 5 7 d. 1 4 5 2 3 6 7

Answer options

A
1 4 2 5 6 3 7
B
1 2 4 3 6 5 7
C
1 4 2 3 6 5 7
D
1 4 5 2 3 6 7

Correct answer: 1 4 2 5 6 3 7

Explanation

Correct answer: 1 4 2 5 6 3 7.

Related Accenture Software Engineering questions

Practice more Accenture Software Engineering questions

PrimerDumps has 1400+ primer questions, 2026 mocks and coding hands-on — all free.