This character denotes the division operator.
forward slash (/)
This common variable type stores letters, numbers, and symbols.
string
This often used statement checks the validity of a statement before creating a branch.
'if' statement
To comment a line in Python, you use this/these character(s).
pound sign (#)
This operator "glues" two strings together.
concatenation (+) operator
These characters have the highest order of operation in Python.
parenthesis
This variable type stores decimal numbers.
float
This flow control statement loops through a set of statements if a test statement continues to evaluate to True.
for or while loop
This commonly used Python data structure contains a collection of items referenced by a numeric index.
list
Identify the letter printed from these lines of code: words = "GIS Rules!" print words[4]
'R'
The result of 9 / 5
1
This function allows user input text to be assigned to a variable.
raw_input()
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
2400
In Python, this is the smallest element of a program that can be executed.
statement
Identify the letters printed from these lines of code: words = "GIS Rules!" print words[:-1]
'GIS Rules'
To raise the number 5 to the power of 8, you must use the power operator. This/These symbol(s) denote the power operator.
two asterisks (**)
Data stored as a string is surrounded by these.
quotes
This type of operators allow you to string together tests in an 'if' statement.
Boolean operator
Python will warn on a logic error, but it will warn (and possibly error) on this type of error.
syntax error
This function returns a string with leading and trailing white spaces removed.
strip()
Denoted as '%', this operator returns the remainder of a division operation.
modulus operator
To determine the variable type of a variable, you would use this function.
type()
The following Python code loops forever. What is it missing?
n = 10
while n<100:
print n
increment statement
This built-in Python function returns the length of many objects, including Lists.
len()
This string operator declares that the following character should be literally interpreted.
escape character (\)