nerdexam
CompTIA

PT0-002 · Question #288

Given the following code: Which of the following data structures is systems?

The correct answer is D. A dictionary. The data structure systems is a dictionary, as indicated by the use of curly braces {} and the key- value pairs separated by colons :. Each key-value pair represents an entry in the dictionary, with the IP address as the key and the corresponding operating system as the value.

Tools and Code Analysis

Question

Given the following code:

Which of the following data structures is systems?

Exhibit

PT0-002 question #288 exhibit

Options

  • AA tuple
  • BA tree
  • CAn array
  • DA dictionary

How the community answered

(33 responses)
  • A
    3% (1)
  • B
    3% (1)
  • C
    6% (2)
  • D
    88% (29)

Explanation

The data structure systems is a dictionary, as indicated by the use of curly braces {} and the key- value pairs separated by colons :. Each key-value pair represents an entry in the dictionary, with the IP address as the key and the corresponding operating system as the value.

Topics

#Data Structures#Dictionaries#Programming Fundamentals#Scripting

Community Discussion

No community discussion yet for this question.

Full PT0-002 Practice