Games Search Example 3
Checking for valid input
User input is in bold.
$ python3 search-games.py This program helps the user explore a data set of over a thousand video games released between 2004 and 2008. In particular, you can: 1. Search by console and release year 2. Search by game title 3. Quit Choice: 0 Invalid choice, try again. 1. Search by console and release year 2. Search by game title 3. Quit Choice: 5 Invalid choice, try again. 1. Search by console and release year 2. Search by game title 3. Quit Choice: -6 Invalid choice, try again. 1. Search by console and release year 2. Search by game title 3. Quit Choice: title Invalid choice, try again. 1. Search by console and release year 2. Search by game title 3. Quit Choice: 1 Enter year: 1999 Please enter a year between 2004-2008. Enter year: 2005 Enter console: PS3 Sorry, no matches were found. 1. Search by console and release year 2. Search by game title 3. Quit Choice: 3 Goodbye!