Wider world of programming
1
CS 110
Reminders and Announcements
Announcements
This Week
Finals Week
Dictionaries (Cheat Sheet) - 01_dictionary_review.py
3
Create a dictionary | my_dict = {} |
Get element from a dictionary | my_dict.get(key) |
Add/replace items in dictionary | my_dict[key] = value |
Remove items from dictionary | del my_dict[key] |
Iterate through a dictionary | for key in my_dict:� print(key, my_dict[key]) |
Check if key exists in dictionary | if my_dict.get(key) != None |
Dictionaries: When are they useful?
4
But where do we get data from?
5
6
Recall what a module is...
Third-Party Modules
One of the reasons that Python is so great is because the broader Python community has built many, many useful libraries for different kinds of domain-specific computation, including:
But how do you get them!?!?
7
Stuff that's just for fun
8
The Command Line
9
Window & Mac Have Different Conventions
The Windows and Mac Operating Systems use different languages to interact with the file system.
10
The Command Line
11
Demo
Bonus
12
Accessing Python from the Command Line
13
The pip command is a tool for installing and managing Python packages
14
PIP
Modules Demos
Pretty Text
Wikipedia
Web servers
Sound
….to P2
15
Web APIs
16
Your Computer
Server
APIs
Access and Authentication
17
Speaking of existing functions…
18
Examples of Web APIs
Some examples of companies and organizations that have REST APIs include
19