This commit is contained in:
lfitchlee
2025-11-07 09:23:15 -05:00
parent 452ddff23d
commit c3f9cd7fca
3 changed files with 27 additions and 4 deletions

0
weather/forcast_return Normal file
View File

View File

@@ -21,4 +21,20 @@ def print_weather(location=None, metric=False, verbose=False):
When metric is True, prints out the weather in metric units.
When verbose is True, prints out a more detailed report.
"""
print("Not finished...") # YOUR CODE HERE!
if location:
coordinates = geocode_location(location)
else:
coordinates = estimate_location()
office = get_weather_office(coordinates["lat"], coordinates["lng"])
forecast = get_forecast(office["office"], office["x"], office["y"], metric=metric)
#print(forecast) # YOUR CODE HERE!
for day in forecast:
display = day["name"] +":"+ day["description"] + " with a high of " + str(day["temperature"]) + "."
print(display)