The example provided in class did not work until I declared the variable outside the ´while´ parameters. I kept getting a syntax error.