exam questions

Exam 300-735 All Questions

View all questions & answers for the 300-735 exam

Exam 300-735 topic 1 question 7 discussion

Actual exam question from Cisco's 300-735
Question #: 7
Topic #: 1
[All 300-735 Questions]


Refer to the exhibit.
Which expression prints the text "802.1x"?

  • A. print(quiz[0]['choices']['b'])
  • B. print(quiz['choices']['b'])
  • C. print(quiz[0]['choices']['b']['802.1x'])
  • D. print(quiz[0]['question']['choices']['b'])
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Ocin
6 months, 1 week ago
A is correct Python 3.8.10 Type "help", "copyright", "credits" or "license" for more information. >>> quiz = [ ... { ... "question": "Which of these is an standard for port-based NAC", ... "choices": {"a":"802.11x", "b":"802.1x","c": "802.11a", "d": "802.11b"}, ... "answer": "b" ... }, ... ] >>> print(quiz[0]['choices']['b']) 802.1x >>> print(quiz['choices']['b']) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: list indices must be integers or slices, not str >>> print(quiz[0]['choices']['b']['802.1x']) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: string indices must be integers >>> print(quiz[0]['questions']['choices']['b']) Traceback (most recent call last): File "<stdin>", line 1, in <module> KeyError: 'questions'
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago