Skip to course content
Free FastAPI backend course

FastAPI for AI Backend Development

Module 02 Knowledge Check

5 questions. Pass mark 4 out of 5. Answer every question before checking the answer key below, then retry after reading the feedback.

1. The constraint that makes logic portable is…

2. Running with --workers 4 means…

3. Typed settings read once at startup mean…

4. The test command on a fresh clone must…

5. Dependencies should be pinned…

---

Answer Key and Explanations

Check these only after attempting every question.

1. B - services import no FastAPI

It can then be called from a worker, a job or a test with no request object.

2. B - any in-memory state exists four times

An in-memory counter, cache or limiter is duplicated per process.

3. B - a bad configuration value fails at boot

Scattered environment lookups fail at the first request that reads them.

4. B - pass with no environment set

If it needs infrastructure, nobody runs it on every change.

5. B - exactly, including transitive ones

Otherwise the build that passed CI is not the build that deployed.

Practical Check

Apply this module to your own work: complete the module activity for *Local Setup, Project Structure and Running with Uvicorn*, then write one sentence naming what your result shows and one naming what it does not.

Strong Answer Pattern

A strong answer names the task, the evidence used, the check performed, and the remaining limitation. It avoids "proved", "guaranteed", or "always" unless the evidence genuinely supports it.