Exam 350-401 Topic 2 Question 155 Discussion
Actual exam question for Cisco's 350-401 exam
Question #: 155
Topic #: 2
Question #: 155
Topic #: 2
What is the output of this code?


Suggested Answer: A Vote an answer
The code defines a function get_credentials() which returns a dictionary containing a username and password.
When the function is called, it retrieves the value associated with the key 'username' from this dictionary.
Since the value for 'username' is set to 'Cisco', the output of this code when the print(get_credentials()) statement is executed will be 'Cisco'.
References: This explanation is based on general programming knowledge in Python, as specific references to Implementing and Operating Cisco Service Provider Network Core Technologies (SPCOR)
When the function is called, it retrieves the value associated with the key 'username' from this dictionary.
Since the value for 'username' is set to 'Cisco', the output of this code when the print(get_credentials()) statement is executed will be 'Cisco'.
References: This explanation is based on general programming knowledge in Python, as specific references to Implementing and Operating Cisco Service Provider Network Core Technologies (SPCOR)
by Elvira at Mar 26, 2025, 10:02 PM
0
0
0
10
Comments
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.
Report Comment
Commenting
You can sign-up / login (it's free).