Food Access Search Example

This example shows some error handling

$ python3 food_access_search.py
Please select one of the following choices:
1. Search by county
2. Search by state
3. Search by population
0. Quit

Enter selection: 5
Invalid choice, try again!
Enter selection: 4
Invalid choice, try again!
Enter selection: -1
Invalid choice, try again!
Enter selection: 17
Invalid choice, try again!
Enter selection: 3.2
Invalid choice, try again!
Enter selection: hi there
Invalid choice, try again!
Enter selection: one
Invalid choice, try again!
Enter selection: 1
County name (or prefix)? nowhere

No records found

Please select one of the following choices:
1. Search by county
2. Search by state
3. Search by population
0. Quit

Enter selection: 2
State name (or prefix)? 7

No records found

Please select one of the following choices:
1. Search by county
2. Search by state
3. Search by population
0. Quit

Enter selection: 3
Minimum population? -7
Error: minimum population must be a positive integer; please try again!
Minimum population? 2.45
Error: minimum population must be a positive integer; please try again!
Minimum population? seven
Error: minimum population must be a positive integer; please try again!
Minimum population? 1000000000000

No records found

Please select one of the following choices:
1. Search by county
2. Search by state
3. Search by population
0. Quit

Enter selection: 0

Goodbye!