Title: Quiz 9 — Environment & Package Management (venv, conda, uv)
Course: AIINFRA 100: AI Systems & Development Environments > Section: Week 09 — Environment & Package Management: venv, conda, uv

Q: What is the primary purpose of a Python virtual environment?
- To make your code run faster
- To isolate a project's installed packages from the system Python and other projects
- To automatically write documentation
- To connect to the internet
A: To isolate a project's installed packages from the system Python and other projects

Q: venv must be installed separately before you can use it, because it does not come with Python.
- True
- False
A: False

Q: Which tool can manage non-Python dependencies (like C libraries or CUDA toolkits) in addition to Python packages?
- venv
- pip
- conda
- None of them can
A: conda

Q: Short answer: What command-line tool is described as a Rust-based, drop-in replacement that can be 10–100x faster than pip and can replace pip, pip-tools, virtualenv, and pyenv?
Feedback: Sample/expected answer: uv

Q: Running pip install requests will always install the package into a safe, isolated location, even if you forgot to activate your project's virtual environment first.
- True
- False
A: False

Q: Which of the following best describes the difference between pyproject.toml/environment.yml and a true lock file like uv.lock?
- They are two names for the exact same thing
- The former declares loose constraints ("what I want"); the lock file pins exact resolved versions ("what was actually installed")
- The lock file is only used for testing, never for production
- Only one of them should ever be committed to version control
A: The former declares loose constraints ("what I want"); the lock file pins exact resolved versions ("what was actually installed")

Q: A requirements.txt file generated with pip freeze alone is guaranteed to produce an identical environment months later, with no risk of version drift.
- True
- False
A: False

Q: Short answer: Name the standard CTE workflow order taught this week for building a reproducible environment (four steps, in order: create, ___, install packages, freeze/lock).
Feedback: Sample/expected answer: activate** (full sequence: create env → activate → install packages → freeze/lock → share)