exam questions

Exam 200-901 All Questions

View all questions & answers for the 200-901 exam

Exam 200-901 topic 1 question 287 discussion

Actual exam question from Cisco's 200-901
Question #: 287
Topic #: 1
[All 200-901 Questions]

DRAG DROP
-

Drag and drop the code snippets from the bottom onto the blanks in the code to complete the happy path scenario. Not all options are used.

Show Suggested Answer Hide Answer
Suggested Answer:

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
tonko
Highly Voted 1 year, 8 months ago
As a precondition, "add_member" takes "member" as an argument. Blank first This operation is performed when the variable "member" is not included in the "members" list. Add "member" to the "members" list using "self.members.append(member)". Blank second field This is the operation when the "members" list already contains "member". I think "return True" is correct since the "members" list already contains "member". Third blank "if member" checks that "member" is not a blank string or zero. Therefore, "retrun False" is correct because "if member else" fills in the operation when it is blank or 0. Blank fourth. def add_member" is a method of the "Team" class, so the correct answer is "team.add.member(member member))". I think "team.add.member(member)" is correct because "team" is an instantiation of "Team". Therefore 1. "self.members.append(member)" 2. "retrun True" 3. "return False" 4. team.add.member(member) If you have other ideas, please comment.
upvoted 11 times
lmqnam
1 year ago
Correct!
upvoted 1 times
...
kymoni
8 months ago
Agreed, this explanation is correct
upvoted 1 times
...
...
mellohello
Highly Voted 1 year, 11 months ago
1. self.members.append(member) 2. return False 3. member.add_member() 4. team.add_member(member)
upvoted 6 times
rtg2123
1 year, 8 months ago
Can you explain why is this? I think it is: Self.members.apped(member)/return True/return False/member.add_member()
upvoted 1 times
...
...
jago83
Most Recent 1 year, 7 months ago
My Take 1. "self.members.append(member)" 2. yield member ---- maintain state between function calls (the "if menber" told us that there is content/state so we should preserve it with yield) 3. "return False" 4. team.add.member(member) DEVASC ONLINE TRAINING "yield keyword, just like return, but doesn't lose the state of the function."
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 ...