This demo uses an if/else statement with a while loop inside each block to show different output depending on the condition.
Output: