Monday 30 May 2011

Showing the flow of running an IF/else statement.


This concept uses a series of clear hoses that have water flowing through it, by deciding which path the water takes (left or right), shows whether the statement is true or false. To explain in more depth and to relate my piece back to the programming foundation; the variable (in code) is substituted by water, and each junction in the water flow system is the “IF” statement. The hoses that go off to the right, without coming to a junction again, are the true outputs and the ones that go off to the left are the false statements.

No comments:

Post a Comment