the api key secretanyone who knows it can write scripts that use your account' usage quota step get location from the command line argument the input for this program will come from the command line make getopenweather py look like this#python getopenweather py prints the weather for location from the command line appid 'your_appid_hereimport jsonrequestssys compute location from command line arguments if len(sys argv print('usagegetopenweather py city_name -letter_country_code'sys exit(location join(sys argv[ :]tododownload the json data from openweathermap org' api todoload json data into python variable in pythoncommand line arguments are stored in the sys argv list the appid variable should be set to the api key for your account without this keyyour requests to the weather service will fail after the #shebang line and import statementsthe program will check that there is more than one command line argument (recall that sys argv will always have at least one elementsys argv[ ]which contains the python script' filename if there is only one element in the listthen the user didn' provide location on the command lineand "usagemessage will be provided to the user before the program ends the openweathermap service requires that the query be formatted as the city namea commaand two-letter country code (like "usfor the united statesyou can find list of these codes at /wiki/iso_ - _alpha- our script displays the weather for the first city listed in the retrieved json text unfortunatelycities that share namelike portlandoregonand portlandmainewill both be includedthough the json text will include longitude and latitude information to differentiate between the cities command line arguments are split on spaces the command line argument san franciscous would make sys argv hold ['getopenweather py''san''francisco,''us'thereforecall the join(method to join all the strings except for the first in sys argv store this joined string in variable named location