Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js

GEOM 73 - Python Quiz 2

Beschreibung

Geography Quiz am GEOM 73 - Python Quiz 2, erstellt von Maggie Samson am 13/04/2019.
Maggie Samson
Quiz von Maggie Samson, aktualisiert more than 1 year ago
Maggie Samson
Erstellt von Maggie Samson vor etwa 6 Jahre
82
2
1 2 3 4 5 (0)

Zusammenfassung der Ressource

Frage 1

Frage
Which of the following are considered a catalog path that are not recognized by Windows and Python, but only by ArcGIS? (check all that apply)
Antworten
  • C:\Projects\Transportation.gdb\Roads
  • C:\Catalog\Parcels.shp
  • E:\Data\Catalog\Project.mdb\Parcels\Lotlines
  • D:\MyFiles\Projects\Network.shp
  • C:\Projects\Roads.dbf

Frage 2

Frage
In the following example code, myfile is a(n) __ and shapeType and baseName are __. import arcpy myfile = arcpy.Describe("C:/Data/Roads.shp") type = myfile.shapeType basename = myfile.baseName
Antworten
  • object, properties
  • object, functions
  • class, functions
  • module, properties
  • module, functions

Frage 3

Frage
Which of the following is (are) a list function of ArcPy? (check all that apply)
Antworten
  • ListProperties
  • ListFields
  • ListFeatureClasses
  • ListDatabases
  • ListFiles
  • ListTables

Frage 4

Frage
Consider the following example code: import arcpy myshape = "C:/Data/Parcels" Which of the following correctly creates a list of field objects of type integer?
Antworten
  • mylist = arcpy.listFields (myshape, "", "Integer")
  • mylist = arcpy.ListFields (myshape, "", "Integer")
  • mylist = arcpy.ListFields (myshape, "Integer")
  • mylist = arcpy.ListFields ("Integer")
  • mylist = arcpy.listFields (myshape, "Integer")
  • mylaist = arcpy.listFields ("Integer")

Frage 5

Frage
Which of the following Python data types are immutable, i.e. you can't modify them but only replace them with new values? (select all that apply)
Antworten
  • String
  • Distionaries
  • Numbers
  • List
  • Tuple

Frage 6

Frage
Which of the following is (are) a type of cursor of the ArcPy data access module? (select all that apply)
Antworten
  • WriteCursor
  • UpdateCursor
  • InsertCursor
  • EditCursor
  • SearchCursor

Frage 7

Frage
Which of the following is (are) a method of the InsertCursor of the ArcPy data access module? (select all that apply)
Antworten
  • insertRow
  • reset
  • next
  • deleteRow

Frage 8

Frage
Consider the following example code that delete rows from a shapefile based on the value RESIDENTIAL in the filed LANDUSE: import arcpy myshape = "C:/Data/Parcels.shp" (missing line) for row in cursor: if row[0] = "RESIDENTIAL" cursor.deleteRow ()
Antworten
  • cursor = arcpy.DeletCursor (myshape, "LANDUSE")
  • cursor = arcpy.da.UpdateCursor (myshape, ["LANDUSE"])
  • cursor = arcpy.da_UpdateCursor (myshape, ["LANDUSE"])
  • cursor = arcpy.da.DeleteCursor (myshape, "LANDUSE")
  • cursor = arcpy.da.DeleteCursor (myshape, ["LANDUSE"])
  • cursor = arcpy.da.UpdateCursor (myshape, "LANDUSE")

Frage 9

Frage
Which of the following creates a new empty text file in Python (provided no file with that name already exists)?
Antworten
  • mytext = write("C:/Data/example.txt", "w")
  • mytext = create("C:/Data/example.txt", "w")
  • mytext = write("C:/Data/example.txt", "a")
  • mytext = open("C:/Data/example.txt", "w")
  • mytext = open("C:/Data/example.txt")
  • mytext = write("C:/Data/example.txt")

Frage 10

Frage
Consider the scenario where you have a text file where each line contains a pair of coordinates and other attribute values. Which of the following is (are) a valid approach to reading the contents of the text file, line by line, for further processing? (select all that apply)
Antworten
  • Open the text file in read mode, than iterate over the lines in a for loop
  • Open the text in read mode, than iterate over the lines in a for loop using the readlines method
  • Open the text file in read mode, than iterate over the lines in a while loop using the readlines method
  • Import the file using the import module, than iterate over the line in a while loop using the readlines method
  • Import the file using the fileinput module, then iterate over the lines in a for loop using the input function
Zusammenfassung anzeigen Zusammenfassung ausblenden

0 Kommentare

There are no comments, be the first and leave one below:

ähnlicher Inhalt

Tectonic Hazards flashcards
katiehumphrey
Characteristics and Climate of a hot desert
Adam Collinge
Geography Quiz
PatrickNoonan
Using GoConqr to study geography
Sarah Egan
All the Countries of the World and their Capital Cities
PatrickNoonan
GCSE Geography - Causes of Climate Change
Beth Coiley
Volcanoes
1jdjdjd1
River Processes and Landforms
1jdjdjd1
The Rock Cycle
eimearkelly3
Globalisation Case Studies
annie