Separate speaker notes to accompany the presentation on Play Computer:

 

Slide #1:

This presentation will run through the logic of a problem given in pseudocode.  It is intended to help with quiz3.

Slide #2:

First, I initialize the areas in memory called firstNum, secondNum, thirdNum and theAns.

Then I check to see if I should enter the loop.  since thirdNum is less then 10, I enter the loop. 

Next I ask the if questions.  If the question is true I execute the statements beneath the if, if the question is not true, I go to the else.

When I finish the if statements, I drop through the end if statements and reach the end while loop.  This sends me back to see if I should do the loop again.

Slide #3:

This slide shows another pass through the loop.  Neither of the IF statements is true so I execute the statement following the else to the inner if.  I add 4 to secondNum.

Slide #4:

This time when I enter the loop I find that the first IF is still false, but that the second IF statement is true so I execute the statements in the second IF.

Slide #5:

This time when I enter the loop, I find that the first if statement is true so I execute the statements in the first IF.

Each slide shows the before and after values in the memory variables.

Slide #6:

In this slide, I again find the first if statement is true and execute the statements associated with it.  Note that when the first IF is true, I execute the statements and then go to the end if associated  with the first if and drop through to the end while loop.

The first if is the outer if and the second if is the inner or nested if.  Each have their own end if.

Slide #7:

The thirdNum is no longer less then 10 so I do not enter the loop.  I drop to the statement right after the end loop and start executing there.  This means I calculate the value of theAns and then display that value.