Functions and While Loop

Addition of functions and while loop.