nerdexam
Cisco

300-835 · Question #84

Refer to the exhibit. An administrator is creating a script using the Python xAPI over WebSockets(xows) library. The goal of this script is to monitor the volume of the endpoint and set the volume…

The correct answer is D. async def volume_callback(volume): if volume.Level > 60: await xows.xCommand.Audio.Volume.Set(Level=60).execute() xows.xFeedback.Event.Audio.Volume.on_changed(volume_callback). Option D is correct because in the xows library, the on_changed callback for xFeedback.Event.Audio.Volume receives a volume data object - not a raw integer - and its level property is accessed as .Level (PascalCase, as xAPI properties follow PascalCase naming conventions)…

Collaboration Endpoints

Question

Refer to the exhibit. An administrator is creating a script using the Python xAPI over WebSockets(xows) library. The goal of this script is to monitor the volume of the endpoint and set the volume to 60 whenever the volume has been set higher than that amount. Which code snippet accomplishes this task when it is added to? Which code snippet accomplishes this task when it is added to?

Exhibits

300-835 question #84 exhibit 1
300-835 question #84 exhibit 2

Options

  • Aasync def volume_callback(volume): if volume > 60: await xows.xCommand.Audio.Volume.Set(Level=60).execute() xows.xFeedback.Event.Audio.Volume.on_changed(volume_callback)
  • Basync def volume_callback(volume): if volume.level > 60: await xows.xCommand.Audio.Volume.Set(Level=60).execute() xows.xFeedback.Event.Audio.Volume.on_changed(volume_callback)
  • Casync def volume_callback(event): if event.Level > 60: await xows.xCommand.Audio.Volume.Set(Level=60).execute() xows.xFeedback.Event.Audio.Volume.on_changed(volume_callback)
  • Dasync def volume_callback(volume): if volume.Level > 60: await xows.xCommand.Audio.Volume.Set(Level=60).execute() xows.xFeedback.Event.Audio.Volume.on_changed(volume_callback)

How the community answered

(42 responses)
  • A
    5% (2)
  • B
    7% (3)
  • C
    14% (6)
  • D
    74% (31)

Explanation

Option D is correct because in the xows library, the on_changed callback for xFeedback.Event.Audio.Volume receives a volume data object - not a raw integer - and its level property is accessed as .Level (PascalCase, as xAPI properties follow PascalCase naming conventions). Option D correctly names the parameter volume to reflect what's being passed, accesses volume.Level with the proper casing, and calls the Set command with the correct Level=60 keyword argument.

Why the others fail:

  • A treats volume as a raw integer by comparing volume > 60 directly, which would raise a TypeError since it's an object.
  • B accesses volume.level with a lowercase l - Python is case-sensitive, so this attribute lookup fails; the correct property is .Level.
  • C uses event.Level which is functionally valid Python, but using event as the parameter name is a generic/imprecise choice that Cisco's exam marks as incorrect since the callback receives a volume object, not a generic event - the exam tests knowing what the callback actually receives.

Memory tip: Think "xAPI = PascalCase Properties" - whenever you access xAPI data in Python, attribute names like Level, Mute, and InputConnector always start with a capital letter, just like the xAPI XML/JSON schema they're derived from.

Topics

#xAPI WebSockets#Volume Control#Endpoint Management#Python async

Community Discussion

No community discussion yet for this question.

Full 300-835 Practice