generated from mwc/lab_weather
got stuff working
This commit is contained in:
@@ -21,4 +21,16 @@ def print_weather(location=None, metric=False, verbose=False):
|
|||||||
When metric is True, prints out the weather in metric units.
|
When metric is True, prints out the weather in metric units.
|
||||||
When verbose is True, prints out a more detailed report.
|
When verbose is True, prints out a more detailed report.
|
||||||
"""
|
"""
|
||||||
print("Not finished...") # YOUR CODE HERE!
|
# YOUR CODE HERE!
|
||||||
|
|
||||||
|
if location:
|
||||||
|
coordinates = geocode_location(location)
|
||||||
|
else:
|
||||||
|
coordinates = estimate_location()
|
||||||
|
|
||||||
|
|
||||||
|
office = get_weather_office(coordinates['lat'], coordinates['lng'])
|
||||||
|
|
||||||
|
|
||||||
|
forcast = get_forecast(office['office'], office['x'], office['y'], metric=metric)
|
||||||
|
print(forcast)
|
||||||
|
|||||||
Reference in New Issue
Block a user