With Correct Answers
When working in ArcGIS Pro, you must import ArcPy to use functions from the ArcPy
site package. - Answerfalse
.In the syntax for a function, what follows the name of the function? - AnswerOne or
more function parameters enclosed in parentheses
.Running the following script returns an error before it begins to execute. Which answer
best describes the reason for the error?
import arcpy f
c = r"C:/Data/Roads arcpy.Buffer_analysis (fc, fc + "_buff", " - AnswerThe path for fc
requires a closing quotation mark.
.Running the following script returns an error after it executes but before it prints any of
the items in dataList. Which answer best describes the reason for the error?
dataList = ("Zoning", "Sewers", "Parcels") for data in datList:
print (data) - AnswerdatList is misspelled in the second line; it should be dataList.
.Which option best describes the purpose of the import math statement in the following
code?
import math
sqRt = math.sqrt(64) - AnswerIn this script, import math allows you to use Python
mathematical functions that are not built in.
.Python has encountered an error before the script can run. This error is most likely an
exception. - AnswerFalse
.In the following code, what data type is being stored in the variable mountains? -
AnswerList
.You can concatenate the number literal 100 with the string literal "meters" with the
following code: 100 + "meters" - Answerfalse
.The following line of code creates a list of data and assigns it to the variable dataList.
dataList = ["Forests", "Soils.shp", "LandUse.mxd"]
Which lines of code will remove shapefiles from dataList? - Answerfor data in dataList: if
data.endswith(".shp"): dataList.remove(data)
.The ArcGIS Pro Python window and an IDE, such as PyCharm, can both execute a
single line of code. - AnswerTrue