General Python
Python String Operations
Python Lists and Dictionaries
Flow Statements
arcpy Functions and Properties
100
To comment a line in Python, you use this/these character(s).
What is a pound sign?
100
This operator "glues" two strings together.
What is the concatenation (+) operator?
100
This operator "glues" two lists together.
What is the concatenation (+) operator?
100
This often used statement checks the validity of a statement before creating a branch.
What is an 'if' statement?
100
This arcpy function returns a list of all toolboxes installed on a machine.
What is ListToolboxes()?
200
This commonly used Python data structure contains a collection of items referenced by a numeric index.
What is a list?
200
Identify the letter printed from these lines of code: words = "GIS Rules!" print words[4]
What is 'R'?
200
This list operation reorders a list into a set order.
What is sort()?
200
This flow control statement loops through a set of statements if a test statement continues to evaluate to True.
What is a while loop?
200
This property sets the current working directory.
What is arcpy.env.Workspace?
300
In Python, this is the smallest element of a program that can be executed.
What is a statement?
300
Identify the letters printed from these lines of code: words = "GIS Rules!" print words[:-1]
What is 'GIS Rules'?
300
Python dictionaries retrieve values using this.
What is a key/index?
300
These operators allow you to string together tests in an 'if' statement.
What is a Boolean operator?
300
This arcpy function returns properties for a specified data element, such as tables, feature classes, geodatabases and rasters.
What is arcpy.Describe()?
400
In Python, the mathematical operator '%' is named what?
What is modulus?
400
This function returns a string with leading and trailing white spaces removed.
What is strip?
400
This list operation returns a contiguous subset of list elements.
What is slice?
400
What is the value of 'x' after the following Python code has completed executing? x = 100 for n in range(1,5): x = x*n print x
What is 2400?
400
This arcpy function inserts rows into a feature class, shapefile or table.
What is arcpy.InsertCursor()?
500
This built-in Python function returns the length of many objects, including Lists.
What is len()?
500
This string operator declares that the following character should be literally interpreted.
What is the escape character (\)?
500
This dictionary function returns a list of all keys stored in the dictionary.
What is .keys()?
500
The following Python code loops forever. What is it missing? n = 10 while n<100: print n
What is a increment statement?
500
This arcpy function gets the specified parameter as a text string by its index position from the list of parameters.
What is arcpy.GetParameterAsText()?
M
e
n
u