From Computer Science Wiki
|
|
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]
- Confidence in dealing with complexity
- Persistence in working with difficult problems
- Tolerance for ambiguity
- The ability to deal with open-ended problems
- The ability to communicate and work with others to achieve a common goal or solutio
|
Credits[edit]
|