While Loops

In class today, we worked through the use of while loops for creating a game that lets a user guess a number from 1 to 100, with the computer providing "Higher"/"Lower" hints along the way.

We developed several variants of the program, with source code as follows:

We will revisit this example soon when exploring user-defined fucntions.


Michael Goldwasser
Last modified: Thursday, 16 February 2017