CompTIA DataX DY0-001 (V1) Practice Question

During a peer review of a production-bound Python ETL script that will feed a real-time ML inference service, you notice the following:

  • Every function begins with a block comment such as # reads csv and cleans data, but there are no docstrings.
  • Inline comments appear on almost every line, including obvious ones (e.g., i += 1 # increment counter).
  • An earlier version of a feature-engineering function is still present but fully commented-out.
  • The team generates API documentation with Sphinx and already stores code history in Git.

Which revision would best bring the script in line with appropriate code commenting practices for process documentation in the data-science life cycle?

  • Convert each inline comment into a runtime logging statement so the execution trace doubles as documentation and remove docstrings to avoid redundancy.

  • Leave the detailed inline comments in place, add TODO tags to mark functions needing refactoring, and keep the commented-out legacy code so future developers can study earlier implementations.

  • Replace the block comments with module-, class-, and function-level docstrings that clearly state purpose, parameters, returns, and side effects; keep brief inline comments only where the intent is not obvious; and delete the commented-out legacy code because Git already preserves it.

  • Strip all comments and docstrings before committing the file to production to reduce file size, and move the descriptive text to an external wiki that developers can consult when necessary.

CompTIA DataX DY0-001 (V1)
Operations and Processes
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

SAVE $64
$529.00 $465.00
Bash, the Crucial Exams Chat Bot
AI Bot