Skip to content

Commit deb1e6e

Browse files
Completed version 1 of the lab.
1 parent 175ea49 commit deb1e6e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

code/zach/lab09-quotes-api.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import requests
2+
3+
def version1():
4+
response = requests.get('https://favqs.com/api/qotd', headers={
5+
'Accept': 'application/json'})
6+
7+
quote = response.json()['quote']['body']
8+
author = response.json()['quote']['author']
9+
10+
return print(f'"{quote}" - {author}')
11+
12+
def main():
13+
version1()
14+
15+
main()

0 commit comments

Comments
 (0)