1. Home
  2. Data Science
  3. Python
  4. What is the purpose of the 'requirements.txt' file when…

Added 10 Feb 2024

What is the purpose of the 'requirements.txt' file when collaborating on a Python project?

  1. To store project documentation
  2. To track changes made to the project
  3. To list all dependencies required by the project Correct answer
  4. To define project settings and configurations

Correct answer

C. To list all dependencies required by the project

14 views

MCQSEXAM

Explanation

The 'requirements.txt' file in a Python project is used to list all the dependencies required by the project. It allows other developers to install the same set of dependencies by running 'pip install -r requirements.txt', ensuring consistency across different development environments.

Doubts & discussion

Not sure why the answer is C? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs