Question: Loops can be nested, this means putting one loop inside another. Build logic with these parts: Setup: create variables strt , prod , sm and

Loops can be nested, this means putting one loop inside another. Build logic with these parts:

Setup: create variables strt, prod, sm and sumofprod and assign an initial value of 0 to each Setup: create the variable i and assign an initial value of 1

WHILE condition: create a while loop with a condition test like this (i <= 10)

Work: open curly-brace { to surround the work which includes...

Setup for an inner loop: create the variable j and assign an initial value of 1

While condition: create a while loop with a condition test like this (j<=6)

Work: open curly-brace { to surround the inner loop work which includes...

calculate prod to be i * j

calculate sm to be i + j

calculate sumofprod to be sumofprod + prod

calculate j to be j + 2 # this is the exit strategy for the inner loop

Close curly-brace } for the inner loop

calculate i to be i + 1 # this is the exit strategy for the outer loop

Close curly-brace } for the outer loop

After Party: This math was not really a great party, so no need for an After Party here. Once you build and run your logic, look at the value of variables in the environment area.

Match the values to their variables as they will be after this logic runs.

Question 5 options:

7

50

15

495

0

1.

strt

2.

prod

3.

sumofprod

4.

sm

5.

j

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!