Examers.io
ExamsOrganizationsHow it worksPricingHelp & FAQ
CompTIA logo

CompTIALinux+

Domain 4Objective 3

Python Basics XK0-006 Practice Questions (Page 4)

Part of the Automation, Orchestration, and Scripting domain, which accounts for 17% of the XK0-006 exam. CompTIA does not publish an official question count, but from its 90-minute exam (~35–60 total, ~6–10 in this domain), expect 1–2 from this objective — we provide 19 practice questions to prepare you well beyond it. (estimate)

19questions here
4free pages
7concepts
17%of the exam

Questions 16–19

  1. 16application · medium

    A script processes a log file and needs to count the number of times each error code appears. The script reads each line, extracts the error code, and stores it. Which data structure is best for accumulating the counts?

    Select an answer first
  2. 17expert · hard

    A script reads a numeric value from a configuration file and uses it in a calculation. The value may be an integer or a float. The script must handle both cases without crashing. Which code snippet is most appropriate?

    Select an answer first
  3. 18foundation · easy

    Which control structure in Python repeatedly executes a block of code as long as a condition is true?

    Select an answer first
  4. 19foundation · easy

    Which built-in function reads a line of text from the user and returns it as a string?

    Select an answer first
Finished these 4 questions?

Review the revealed explanations, or continue through the curriculum.

No more pagesBack to XK0-006

Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by CompTIA. “XK0-006” is a trademark of its owner, used for identification only.