wk03.p7Practice exerciseWeek 03 · Data and the outside worldOpen · due this week

Which library for which job?

Real programming starts with a question: "is there already a library for this?" Here are three everyday situations — each one explained in plain words — and your job is to find the Python library that handles it, using an AI and a quick web search.

What you'll build

Real programming starts with a question: "is there already a library for this?" Here are three everyday situations — each one explained in plain words — and your job is to find the Python library that handles it, using an AI and a quick web search.

Requirements

The must-do parts. If any are missing, we'll ask you to take another pass.

  1. Read the three situations in the starter first — each one is explained in plain words, so you do not need to already know what a spreadsheet or a website request is.
  2. For each situation, find ONE Python library that handles it. Ask an AI ("what Python library would I use to ...?") and/or search the web.
  3. For each one, write down three things: the situation, the library's name, and one plain sentence on what that library is for.
  4. Note how you found each answer — which AI or website, and the exact question you asked.
  5. Pick the ONE situation that interests you most and find the single line you would start with (for example pandas.read_csv("applicants.csv")). You do not have to run it — just find it.
Bonus, if you're feeling brave
  • In Colab, import one of the libraries you found and run one line from it. Many of the popular ones are already installed.
  • Find a SECOND library that solves the same problem, and write one line on how you would choose between the two.

Examples

What your program should look like when it runs. Lines starting with $ are typed by you; the rest is your program.

What one finished row looks like
Situation:  Read a spreadsheet of applicants into Python
Library:    pandas
What for:   Reading, filtering and summarising tables of data.
Found by:   Asked an AI "what library reads an Excel file in Python?"
Start at:   pandas.read_excel("applicants.xlsx")

Where to start

Copy this scaffold into a new file. You don't have to use it — it's just a friendly nudge.

Three real situations are described below. You do NOT need to know how to
solve them — your only job is to find out which Python library each one
would use. For each, ask an AI or search the web, then write down: the
situation, the library's name, and one sentence on what it does.

1. The spreadsheet
   You keep your applicants in Google Sheets or Excel — a grid with one row
   per person (name, GPA, country). A grid like that is called a "spreadsheet",
   and it usually saves as a .xlsx or .csv file. You want Python to open that
   file and read the rows.
   -> Which library reads a spreadsheet file into Python?

2. The chart
   You have a few numbers — say, how many applicants came from each country.
   You want to turn them into a picture made of bars, so the differences are
   easy to see at a glance. That picture is called a "bar chart".
   -> Which library draws a bar chart from some numbers?

3. The live information
   Some information lives on a website and keeps changing — like today's
   exchange rate. "Fetching" means your program reaches out over the internet
   and grabs that information for you, instead of you copying it by hand.
   -> Which library fetches information from a website?

A question you can paste into any AI — fill in the blank:
  "I'm a beginner in Python. What library would I use to ___?
   Name the most common one and show me the single line I'd start with."

How we'll grade it

Four checks, four points. Three or above is passing — we'll ask you to revise anything we can't tick.

CheckWhat we look forPt
Three libraries namedA real, correctly-spelled library for each of the three problems (the usual answers are pandas, matplotlib, and requests).1
What it's forEach library has a one-sentence description in plain language, in your own words.1
Showed your workingYou noted how you found each one — which AI or site, and what you asked.1
Went one step deeperFor one problem, you found the actual function or first line you would start with.1
Ready?
Hand it in
You can submit a draft and revise later if you're not done.
Begin submission →