Solving Complex Problems Through Programming - September 17 2018 Lesson Notes: Difference between revisions
Mr. MacKenty (talk | contribs) (Created page with " __NOTOC__ <table cellspacing="10" style="width:100%;"> <tr> <td style="width:50%; margin:0; margin-top:10px; margin-right:10px; border:1px solid #dfdfdf; padding:0 1em 1em 1...") |
Mr. MacKenty (talk | contribs) |
||
Line 13: | Line 13: | ||
* Treehouse leaderboard | * Treehouse leaderboard | ||
* We will start to learn about [[API]]'s. | * We will start to learn about [[API]]'s. | ||
* Please write a program to parse some data from any TWO of these API's: https://github.com/toddmotto/public-apis#animals | |||
<syntaxhighlight lang="python"> | <syntaxhighlight lang="python"> | ||
import json | import json |
Latest revision as of 11:23, 17 September 2018
What are we going to learn today?[edit]Welcome
import json
import requests
# documentation for this https://sunrise-sunset.org/api
# latitude = input("Enter your latitude: ")
# longitude = input("Enter your longitude: ")
response = requests.get('https://api.sunrise-sunset.org/json?lat=36.7201600&lng=-4.4203400')
# print(response.text)
# print(response.json)
parsed_json = json.loads(response.text)
# print(type(response.text))
foo = parsed_json['results']
print(foo['sunrise'])
|
What is our home learning?[edit]Please check google classroom for homework.
|
How am I being assessed today?[edit]I will assess you formatively today, and make a professional judgement to what extent you understand our learning material. I will use observation, your written work, answers to questions, and contribution to class discussions as data to make my decisions. I will also ask you to complete a self-assessment which I will use to help me guage how well you think you understand our material in class. |
|
As a computer scientist, you have:[edit]
|
|
Credits[edit] |