vlans_list is a python list contaning the numbers: 10 , 20 and 30 (as integers)
The function "add_vlans" scan the list and 100 to every item.
The result should be:
[110, 120, 130]
So in my opinion the answer should be:
[B] - A list of new VLANs is created.
tried it online. the thing is that the vars are referenced and not sent by value.
def main():
vlans_list = [10, 20, 30]
add_vlans(vlans_list)
print(vlans_list)
def add_vlans(vlans):
for i in range(len(vlans)):
vlans[i]+=100
if _name_ == '_main_':
main()
This section is not available anymore. Please use the main Exam Page.350-401 Exam Questions
Log in to ExamTopics
Sign in:
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.
DavideDL
Highly Voted 1 year, 6 months ago[Removed]
Most Recent 4 months, 3 weeks ago[Removed]
5 months, 1 week agoHarwinderSekhon
1 year, 4 months agoMJane
1 year, 6 months agoJackDRipper
1 year, 6 months agoHungarianDish_111
1 year, 6 months agoMJane
1 year, 6 months ago