workshop 04 - Calling an API from Python
workshop 04 - Calling an API from Python
Python and APIs (important: for fun - not required for the
assessment)
1. Type and run the code below (in either Idle or Pyzo):
Notice how the code is similar to JavaScript (get data, convert to JSON object, display)
1. Ask the user to enter a city name (using the input function)
2. Deal with exceptions (e.g. the user misspells the name of the city)
3. Run the code on your Raspberry Pi and turn on red/ember/green LEDs depending on the
severity of the weather, or coldness of temperature 😊 Add Raspberry Pi to your diagram.