nerdexam
CiscoCisco

200-901 · Question #473

200-901 Question #473: Real Exam Question with Answer & Explanation

Sign in or unlock 200-901 to reveal the answer and full explanation for question #473. The question stem and answer options stay visible for context.

Software Development and Design

Question

Refer to the exhibit. An astronomer creates a Python script named makeexoplanetapi.py to import external data for comparison with the department data. The astronomer changes the script after a discussion with another astronomer. Which code snippet shows a unified diff of the script? A. B. C. D.

Options

  • A--- makeexoplanetapi.py 2020-12-20 19:30:32 +++ makeexoplanetapi.py 2020-12-20 19:30:32 @@ -8,3 +8,3 @@ - response = requests.post('https://httpbin.org') + app = Flask(__name__) + @app.route('/planets_data') with open("planets_exo.csv", "r", encoding="utf-8-sig") as f: exo = json.load(f) with open("exo_api.csv", "w", encoding="utf-8-sig") f.write(str(reader)) print(exo)
  • B--- makeexoplanetapi.py 2020-12-20 19:30:32 +++ makeexoplanetapi.py 2020-12-20 19:30:32 @@ -1,4 +1,5 @@ import csv import json import requests -app = Flask(__name__) +add app = Flask(__name__) response = requests.post('https://httpbin.org') with open("planets_exo.csv", "r", encoding="utf-8-sig") as f: exo = json.load(f) with open("exo_api.csv", "w", encoding="utf-8-sig") sub = json.dumps(sub, indent=4) print(sub) with open("exo_api.csv", "r", encoding="utf-8-sig") sub_list = json.load(sub) add sub = json.dumps(sub, indent=4) print(exo)
  • C--- makeexoplanetapi.py 2020-12-20 19:30:32 +++ makeexoplanetapi.py 2020-12-20 19:30:32 @@ -1,7 +1,8 @@ import csv import json import requests - response = requests.post('https://httpbin.org') + app = Flask(__name__) + @app.route('/planets_data') with open("planets_exo.csv", "r", encoding="utf-8-sig") as f: exo = json.load(f) with open("exo_api.csv", "w", encoding="utf-8-sig") f.write(str(reader)) print(exo)
  • D--- makeexoplanetapi.py 2020-12-20 19:30:32 +++ makeexoplanetapi.py 2020-12-20 19:30:32 @@ -8,3 +8,3 @@ response = requests.post('https://httpbin.org') - app = Flask(__name__) + @app.route('/planets_data') with open("planets_exo.csv", "r", encoding="utf-8-sig") as f: exo = json.load(f) with open("exo_api.csv", "w", encoding="utf-8-sig") f.write(str(reader)) print(exo)

Unlock 200-901 to see the answer

You've previewed enough free 200-901 questions. Unlock 200-901 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#unified diff#version control#code comparison
Full 200-901 PracticeBrowse All 200-901 Questions