''' Purpose: demonstrate while loop and dict mappings Name: Email id: ''' # get url reading abilities import url # where is the commodity cost mappings COMMODITIES_CSV = 'http://www.cs.virginia.edu/~cs1112/datasets/csv/commodities.csv' # get web-based commodities dataset dataset = url.get_csv_dataset( COMMODITIES_CSV ) # convert dataset into commodity cost mappings dictionary commodity_mappings = {} ... # while user is supplying queries, process them. user indicates no more # queries by not entering an empty response ... # all done