📊 Section 1 · Foundations 🟣 Checkpoint Quiz MODULE 07 · QUIZ

Section Quiz — Python & NumPy

⏱️ 18 min
📖 Recap + Assessment
🧩 12 Quiz Questions
🏆 Section Checkpoint
Your progress in Section 1100%
🎯 What this checkpoint covers: This is a review lesson, not new teaching. It's a 12-question assessment pulling from everything in Section 1 — Lessons 1 through 6: the course roadmap and tools, environment setup, core Python idioms, file I/O, and NumPy arrays, indexing, and broadcasting. Skim the recap below, then take the quiz.

Section 1 in a Nutshell

Before the quiz, here's a compressed recap of the six lessons you've completed. If any of these points feel unfamiliar, it's worth a quick re-read of that lesson before you continue.

1
Lesson 1 — Welcome & Course Roadmap
Data science combines programming, statistics, and domain knowledge to turn raw data into decisions, following the workflow collect → clean → explore → model/visualize → communicate. This course covers five tools — NumPy, Pandas, Matplotlib, Seaborn, Scikit-Learn — across 6 sections.
2
Lesson 2 — Setup: Anaconda, Jupyter & VS Code
Anaconda bundles Python with the data science stack and the conda package manager. Jupyter notebooks run code cell-by-cell with inline output, using Shift+Enter to execute a cell. VS Code's Jupyter extension can open the same .ipynb files. pip install adds packages; virtual environments keep project dependencies isolated.
3
Lesson 3 — Python Refresher
List comprehensions ([expr for x in it if cond]) transform data in one line. .get(key, default) avoids KeyError. Lambdas are small anonymous functions, often used as a sort key. f-strings (f"{value:.2f}") format output cleanly.
4
Lesson 4 — Files: CSV, JSON & Excel
with open(...) as f: guarantees a file closes automatically. csv.DictReader/DictWriter read and write CSV rows as dicts; pd.read_csv() does it in one line. json.load()/dump() work with files, loads()/dumps() work with strings. pd.read_excel() needs openpyxl installed.
5
Lesson 5 — NumPy: Arrays & Operations
Vectorization applies an operation to a whole array without an explicit loop. Create arrays with np.array(), np.zeros(), np.arange(), np.linspace(). + - * / on arrays are element-wise. np.sum(), np.mean(), np.std() compute statistics fast.
6
Lesson 6 — NumPy Advanced
Boolean masking (arr[arr > 10]) filters by condition, using &/|, not and/or. Fancy indexing (arr[[0,2,4]]) selects known positions. Broadcasting lets differently-shaped arrays combine when trailing dimensions match or are 1. @ and np.dot() perform matrix multiplication.
🧩 Python & NumPy Checkpoint — 12 Questions
Answer all 12 questions to test your mastery of Section 1. Instant feedback on every answer.
1. Which three skill sets does data science combine?
2. In Jupyter, what does Shift+Enter do?
3. What does [n * 2 for n in [1, 2, 3]] evaluate to?
4. What is a lambda function most commonly used for?
5. Why wrap file operations in with open(...) as f:?
6. What does csv.DictReader use as keys for each row?
7. What's the difference between json.load() and json.loads()?
8. What does "vectorization" mean in NumPy?
9. What does np.array([1, 2, 3]) + np.array([10, 20, 30]) produce?
10. Which operators combine two boolean conditions on a NumPy array?
11. Can a (3, 4) array and a (4,) array be broadcast together?
12. Which operator performs matrix multiplication between two NumPy arrays?
Finished the checkpoint?
Mark it complete to track your progress.
🎉

Section 1 Complete!

You've mastered the Python foundations for data science — the environment, core idioms, file I/O, and NumPy arrays, indexing, and broadcasting. Section 2 starts with Pandas: Series and DataFrames.

Module 07 of 7 Section 1 — Python for Data Science Foundations