> ## Documentation Index
> Fetch the complete documentation index at: https://linux-plus.ipoint-labs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Domain 13 Review Quiz

> 21 practice questions for Domain 13. Scripting with Bash and Python.

21 practice questions covering **Scripting with Bash and Python**. Read the question, take answers from the room, then reveal.

<div className="quiz" data-total="21">
  <div className="quiz__q" data-n="1" data-answer="A">
    <p className="quiz__stem">
      { "Which of the following describes PEP 8?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A" data-correct="1"><span className="quiz__letter">A</span><span className="quiz__text">{ "The style guide for Python code" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "Python virtual environments" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "A package installer for Python" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "A Python variable holding octal values" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: A</p>

      <p className="quiz__why">
        { "PEP 8 is the official Python Enhancement Proposal that provides coding style guidelines for writing clean, consistent, and readable Python code." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="2" data-answer="A">
    <p className="quiz__stem">
      { "A DevOps engineer needs to create a local Git repository. Which of the following commands should the engineer use?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A" data-correct="1"><span className="quiz__letter">A</span><span className="quiz__text">{ "git init" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "git clone" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "git config" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "git add" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: A</p>

      <p className="quiz__why">
        { "The git init command initializes a new, empty Git repository in the current directory, making it the correct choice for creating a local repository." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="3" data-answer="A">
    <p className="quiz__stem">
      { "A Linux administrator is making changes to local files that are part of a Git repository. The administrator needs to retrieve changes from the remote Git repository. Which of the following commands should the administrator use to save the local modifications for later review?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A" data-correct="1"><span className="quiz__letter">A</span><span className="quiz__text">{ "git stash" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "git pull" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "git merge" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "git fetch" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: A</p>

      <p className="quiz__why">
        { "The git stash command temporarily saves local modifications without committing them, allowing the administrator to safely run git pull or git fetch later and then reapply the saved changes." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="4" data-answer="D">
    <p className="quiz__stem">
      { "Which of the following is the best use of AI within a Linux environment?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "Giving full control of the Linux server to the AI engine" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "Uploading company internal messaging for user validation" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "Outsourcing proprietary source code development to the LLM" }</span></li>
      <li className="quiz__choice" data-letter="D" data-correct="1"><span className="quiz__letter">D</span><span className="quiz__text">{ "Generating an nginx configuration file that can be used for testing" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: D</p>

      <p className="quiz__why">
        { "As AI and Large Language Models (LLMs) become integrated into IT workflows, CompTIA Linux+ V8 emphasizes the responsible and secure use of these tools. AI can significantly improve administrative efficiency when used as an assistant for repetitive or boilerplate tasks, but it introduces significant security and ethical risks if not governed properly. The best and most appropriate use of AI among the options provided is generating configuration files for testing (Option D). AI is highly effective at creating standard templates, such as NGINX server blocks, systemd unit files, or basic shell scripts. This allows an administrator to quickly prototype a configuration. However, the Linux+ curriculum stresses that any AI-generated output must be reviewed, linted, and tested by a human administrator before being moved to production." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="5" data-answer="D">
    <p className="quiz__stem">
      { "In the echo \"profile-$num-$name\" line of a shell script, the variable $num seems to not be expanding during execution. Which of the following notations ensures the value is expanded?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "echo \"profile-$(num)-$name\"" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "echo 'profile-$num-$name'" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "echo \"profile-‘Snum‘-$name\"" }</span></li>
      <li className="quiz__choice" data-letter="D" data-correct="1"><span className="quiz__letter">D</span><span className="quiz__text">{ "echo \"profile-${num}-$name\"" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: D</p>

      <p className="quiz__why">
        { "Using ${num} ensures correct variable expansion, especially when variables are adjacent to other characters or hyphens. This prevents ambiguity and guarantees $num is properly expanded within the string." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="6" data-answer="B">
    <p className="quiz__stem">
      { "A Linux software developer wants to use AI to optimize source code used in a commercial product. Which of the following steps should the developer take first?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "Research which of the available AI chatbots are best at optimizing source code." }</span></li>
      <li className="quiz__choice" data-letter="B" data-correct="1"><span className="quiz__letter">B</span><span className="quiz__text">{ "Verify that the company has a policy governing the use of AI in software development." }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "Install a private LLM to use on the internal network for source code optimization." }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "Use open-source LLMs that undergo regular security reviews by the community." }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: B</p>

      <p className="quiz__why">
        { "Before using AI on commercial source code, the developer must first ensure compliance with company policies, legal requirements, and security standards. This prevents potential intellectual property, licensing, or confidentiality issues." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="7" data-answer="B">
    <p className="quiz__stem">
      { "A DevOps engineer made some changes to files on a local repository. The engineer realizes that the changes broke the application and the changes need to be reverted back. Which of the following commands is the best way to accomplish this task?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "git pull" }</span></li>
      <li className="quiz__choice" data-letter="B" data-correct="1"><span className="quiz__letter">B</span><span className="quiz__text">{ "git reset" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "git rebase" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "git stash" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: B</p>

      <p className="quiz__why">
        { "The git reset command reverts changes in the local repository to a previous commit, effectively discarding the problematic modifications and restoring the application to a working state." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="8" data-answer="B">
    <p className="quiz__stem">
      { "Which of the following is a characteristic of Python 3?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "It is closed source." }</span></li>
      <li className="quiz__choice" data-letter="B" data-correct="1"><span className="quiz__letter">B</span><span className="quiz__text">{ "It is extensible through modules." }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "It is fully backwards compatible." }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "It is binary compatible with Java." }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: B</p>

      <p className="quiz__why">
        { "Python 3 is open source and supports extensibility through modules and packages, allowing developers to add functionality easily. It is not fully backward compatible with Python 2 and has no binary compatibility with Java." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="9" data-answer="C">
    <p className="quiz__stem">
      { "A Linux administrator wants to use AI to deploy infrastructure as code. Which of the following is a best practice regarding the use of AI for this task?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "Using copy and paste when possible" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "Generating monolithic code" }</span></li>
      <li className="quiz__choice" data-letter="C" data-correct="1"><span className="quiz__letter">C</span><span className="quiz__text">{ "Linting generated code" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "Merging CI/CD pipelines" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: C</p>

      <p className="quiz__why">
        { "Linting ensures that AI-generated infrastructure-as-code (IaC) follows proper syntax, formatting, and best practices. This helps prevent errors, enforces consistency, and improves security before deployment." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="10" data-answer="D">
    <p className="quiz__stem">
      { "A systems administrator needs to write a script that counts the number of times “FAIL” appears in a log file. If “FAIL” appears zero times, then the administrator would like to print the message “SUCCESS.” Given the following: Which of the following should be used before the zero to complete the script?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "-ne" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "-gt" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "-lt" }</span></li>
      <li className="quiz__choice" data-letter="D" data-correct="1"><span className="quiz__letter">D</span><span className="quiz__text">{ "-eq" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: D</p>

      <p className="quiz__why">
        { "The test should check if the count of \"FAIL\" equals zero. The operator -eq is used for numeric equality in shell conditionals, so [ $(grep -c FAIL /var/file.log) -eq 0 ] correctly evaluates whether the count is zero." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="11" data-answer="A">
    <p className="quiz__stem">
      { "Which of the following best describes a benefit of using a Python virtual environment?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A" data-correct="1"><span className="quiz__letter">A</span><span className="quiz__text">{ "To prevent conflicts between projects that require different versions of the same package" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "To help decrease disk space usage" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "To make packages installed within the virtual environment available systemwide" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "To help maintain a consistent environment across all projects" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: A</p>

      <p className="quiz__why">
        { "A Python virtual environment isolates project dependencies, allowing different projects to use different versions of the same package without interfering with each other." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="12" data-answer="B">
    <p className="quiz__stem">
      { "Which of the following allows modules to be used in Python scripts?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "__init__" }</span></li>
      <li className="quiz__choice" data-letter="B" data-correct="1"><span className="quiz__letter">B</span><span className="quiz__text">{ "import" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "__name__" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "det" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: B</p>

      <p className="quiz__why">
        { "This statement makes functions, classes, and variables from a module available for use within a Python script, enabling modular and reusable code." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="13" data-answer="C">
    <p className="quiz__stem">
      { "A Linux engineer needs to record new changes completed on a Git repository. Which of the following commands should the engineer use?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "git push" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "git add" }</span></li>
      <li className="quiz__choice" data-letter="C" data-correct="1"><span className="quiz__letter">C</span><span className="quiz__text">{ "git commit" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "git clone" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: C</p>

      <p className="quiz__why">
        { "This command records the staged changes in the local repository by creating a new commit, preserving a snapshot of the work and its history." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="14" data-answer="A">
    <p className="quiz__stem">
      { "Which of the following is an example of responsible use of publicly available generative AI by a systems administrator?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A" data-correct="1"><span className="quiz__letter">A</span><span className="quiz__text">{ "Generating regular expressions based on anonymized data" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "Fixing typos and styles in medical documentation files" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "Reviewing the security of server configuration files" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "Linting of proprietary source code stored in the Git repository" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: A</p>

      <p className="quiz__why">
        { "Using anonymized data ensures that no sensitive or proprietary information is exposed while still allowing the administrator to benefit from generative AI for tasks such as creating regular expressions." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="15" data-answer="C">
    <p className="quiz__stem">
      { "A systems administrator is developing a script to copy a file if it exists and return an error if it does not. Given the following incomplete script: Which of the following statements is missing from the script?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "while" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "done" }</span></li>
      <li className="quiz__choice" data-letter="C" data-correct="1"><span className="quiz__letter">C</span><span className="quiz__text">{ "else" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "for" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: C</p>

      <p className="quiz__why">
        { "An else statement is required to handle the condition when the file does not exist so the script can return the error message instead of attempting the copy operation." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="16" data-answer="B">
    <p className="quiz__stem">
      { "Which of the following best describes PEP 8?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "A list of built-in Python modules" }</span></li>
      <li className="quiz__choice" data-letter="B" data-correct="1"><span className="quiz__letter">B</span><span className="quiz__text">{ "A set of coding conventions for Python code" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "A name for standard Python libraries" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "A data structure in Python" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: B</p>

      <p className="quiz__why">
        { "PEP 8 defines the official style guide for Python, providing coding conventions that improve code readability and consistency across Python projects." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="17" data-answer="D">
    <p className="quiz__stem">
      { "A Linux administrator needs to create accounts for a list of new users. The user account names have been defined in the user LIST variable by executing the following: USER_LIST=\"alice bob charles\" Which of the following commands should the administrator use to successfully create the user accounts?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "echo \"$USER LIST\" | while username; do useradd -m \"$username\"; done" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "echo \"$USER_LIST\" | until username; do useradd -m \"$username\"; done" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "select username in \"$USER_LIST\"; do useradd -m $username\"; done" }</span></li>
      <li className="quiz__choice" data-letter="D" data-correct="1"><span className="quiz__letter">D</span><span className="quiz__text">{ "for username in $USER_LIST; do useradd -m \"$username\"; done" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: D</p>

      <p className="quiz__why">
        { "This command iterates over each username stored in the variable and executes the account creation command for each entry, which is the correct and reliable way to create multiple user accounts from a list in a shell script." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="18" data-answer="A">
    <p className="quiz__stem">
      { "Which of the following is the first step when starting a new Python project on a Linux system?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A" data-correct="1"><span className="quiz__letter">A</span><span className="quiz__text">{ "python -m venv /path/to/project" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "python -m pip install -r /path/to/project" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "export PYTHON_PATH:/path/to/project" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "python -m source /path/to/project" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: A</p>

      <p className="quiz__why">
        { "Creating a virtual environment is the first step because it provides an isolated Python runtime for the project, allowing dependencies to be managed independently without affecting the system- wide Python installation." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="19" data-answer="D">
    <p className="quiz__stem">
      { "A systems administrator wants to update and apply changes in an existing file in a remote Git repository. Which of the following is the last Git command the administrator should execute to complete this process?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "git commit -m \"Updated with new information\"" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "git checkout -b update-feature" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "git pull origin main" }</span></li>
      <li className="quiz__choice" data-letter="D" data-correct="1"><span className="quiz__letter">D</span><span className="quiz__text">{ "git push origin update-feature" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: D</p>

      <p className="quiz__why">
        { "The git push command sends the committed changes from the local branch to the remote repository, making the updates available remotely and completing the update process." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="20" data-answer="B">
    <p className="quiz__stem">
      { "Which of the following is an example of an AI best practice?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "Copying/pasting directly into a terminal" }</span></li>
      <li className="quiz__choice" data-letter="B" data-correct="1"><span className="quiz__letter">B</span><span className="quiz__text">{ "Sanitizing sensitive data" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "Sampling a group of similar users when creating the model" }</span></li>
      <li className="quiz__choice" data-letter="D"><span className="quiz__letter">D</span><span className="quiz__text">{ "Always linting proprietary source code" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: B</p>

      <p className="quiz__why">
        { "Sanitizing sensitive data helps protect confidential information before it is used with AI systems, reducing the risk of data exposure and supporting responsible AI usage." }
      </p>
    </div>
  </div>

  <div className="quiz__q" data-n="21" data-answer="D">
    <p className="quiz__stem">
      { "A systems administrator needs to check access to all company servers. The administrator uses the following script, which does not complete: for i in $(cat /home/user1.file) do echo $i ssh $i uptime Which of the following is missing from the script?" }
    </p>

    <ul className="quiz__choices">
      <li className="quiz__choice" data-letter="A"><span className="quiz__letter">A</span><span className="quiz__text">{ "fi" }</span></li>
      <li className="quiz__choice" data-letter="B"><span className="quiz__letter">B</span><span className="quiz__text">{ "else" }</span></li>
      <li className="quiz__choice" data-letter="C"><span className="quiz__letter">C</span><span className="quiz__text">{ "while" }</span></li>
      <li className="quiz__choice" data-letter="D" data-correct="1"><span className="quiz__letter">D</span><span className="quiz__text">{ "done" }</span></li>
    </ul>

    <div className="quiz__reveal">
      <p className="quiz__verdict" />

      <p className="quiz__answer">Answer: D</p>

      <p className="quiz__why">
        { "Shell scripting is a primary method for automating repetitive tasks in Linux. According to the CompTIA Linux+ V8 scripting objectives, administrators must understand the syntax for various control structures, including loops. A for loop in Bash and other POSIX-compliant shells has a specific required structure: - The for statement (to define the iteration). - The do keyword (to start the block of commands). - The loop body (the commands to execute). - The done keyword (to terminate the loop block). In the script provided, the administrator has correctly initiated the loop with for i in ... and opened the execution block with do. However, the script lacks the concluding done token. Without done, the shell interpreter will continue waiting for more input or return a syntax error because it does not know where the loop ends. This is why the script \"does not complete\" or run correctly." }
      </p>
    </div>
  </div>
</div>
