Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write the number of for statement loops that will be performed for each of the f

ID: 641969 • Letter: W

Question

Write the number of for statement loops that will be performed for each of the following:

Initialization

(before loop)

Condition

(top of loop)

Update

(bottom of loop)

Loops?

i = 10

i <= 35

i = i + 1

i = 4

i <= 12

i = i + 4

i = 18

i <= 18

i = i + 1

i = 1

i > 2

i = i + 1

i = 10

i < 100

i = i

Initialization

(before loop)

Condition

(top of loop)

Update

(bottom of loop)

Loops?

i = 10

i <= 35

i = i + 1

i = 4

i <= 12

i = i + 4

i = 18

i <= 18

i = i + 1

i = 1

i > 2

i = i + 1

i = 10

i < 100

i = i

Explanation / Answer

Initialization

Condition

Update

Initialization

(before loop)

Condition

(top of loop)

Update

(bottom of loop) Loops? i = 10 i <= 35 i = i + 1 26 i = 4 i <= 12 i = i + 4 3 i = 18 i <= 18 i = i + 1 1 i = 1 i > 2 i = i + 1 0 i = 10 i < 100 i = i