Drag and drop the code snippets from the bottom onto the blanks in the Python script to print the device model to the screen and write JSON data to a file. Not all options are used.
json.dump() method used to write Python serialized object as JSON formatted data into a file.
json.dumps() method is used to encodes any Python object into JSON formatted String
1st command: Prints the model for the device (which is a Cisco Nexus 3550)
2nd command: Creates a file named "data.json" (if it doesn't exist,) and then writes to this file
3rd command: Converts the Python dictionary "data" into a JSON format, and writes its content into the JSON file "data.json"
The provided answers are correct!
correct answer provided
with open("sample.json", "w") as outfile:
json.dump(dictionary, outfile)
upvoted 3 times
...
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.
aatechler
Highly Voted 1 year agoteems5uk
Highly Voted 1 year, 3 months agoAbdullahMohammad251
Most Recent 7 months, 1 week agoawsguruking
1 year, 1 month ago