''' Purpose: provide weather forecast by accessing US Weather Service web service Usage: user provides a zipcode Output: municipality and state combo along with its current forecast ''' # get url access capabilities from cs 1112 module import url # define weather.gov base query WEATHER_GOV_QUERY = 'http://forecast.weather.gov/zipcity.php?inputstring=' # get zipcode of interest zipcode = input( 'Enter zipcode: ' ) # specify complete query query_link = WEATHER_GOV_QUERY + zipcode # get response from weather.gov page = url.get_contents( query_link ) # forecast delimiters OPENING_DELIMITER = '