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

Added 10 Feb 2024

What is the purpose of requirements.txt file in Python projects?

  1. To store Python source code
  2. To specify the version of Python used in the project
  3. To list all the dependencies required by the project Correct answer
  4. To define configuration settings for the project

Correct answer

C. To list all the dependencies required by the project

18 views

MCQSEXAM

Explanation

The requirements.txt file in Python projects is used to specify the dependencies required by the project. It typically contains a list of package names and their versions, allowing other developers to install the exact same set of dependencies by running 'pip install -r requirements.txt'.

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