Practical Coding in Python

Learn to write and validate your own code

Darren Kessner, PhD

(revised September 1, 2025)

Previous: hello_emoji

hello_requests

Output:

status_code: 200

city: West Hollywood
forecast_url: https://api.weather.gov/gridpoints/LOX/152,46/forecast

This Afternoon
Mostly cloudy, with a high near 68. Southwest wind around 10 mph, 
with gusts as high as 20 mph.

Tonight
Cloudy, with a low around 58. Southwest wind 0 to 10 mph.

Monday
Partly sunny, with a high near 67. Southwest wind 0 to 15 mph.

Monday Night
A slight chance of rain showers between 11pm and 5am. Mostly 
cloudy, with a low around 55. West southwest wind 0 to 15 mph. 
Chance of precipitation is 20%. New rainfall amounts less than a 
tenth of an inch possible.

Tuesday
Mostly sunny, with a high near 67. Southwest wind 0 to 10 mph, with 
gusts as high as 20 mph.

Tuesday Night
Mostly clear, with a low around 54.

Wednesday
Sunny, with a high near 73.

Wednesday Night
Mostly clear, with a low around 57.

Thursday
Sunny, with a high near 78.

Thursday Night
Mostly clear, with a low around 60.

Friday
Sunny, with a high near 79.

Friday Night
Mostly clear, with a low around 60.

Saturday
Sunny, with a high near 80.

Saturday Night
Mostly clear, with a low around 60.

Next: