What character denotes the division operator?
What is forward-slash(/)?
This common variable type stores letters, numbers, and symbols.
What is a String?
This often used statement checks the validity of a statement before creating a branch.
What is an 'if' statement?
To comment a line in Python, you use this/these character(s).
What is hash·tag(#)?
This operator "concatenates" two strings together.
What is "+" operator?
What is the output of the following code?
a = "Hello"
b = "World"
print(len(a)*len(b))
What is 25?
This variable type stores decimal numbers.
What is a float?
This flow control statement loops through a set of statements if a test statement continues to evaluate to True.
What is a for or while loop?
This commonly used Python data structure contains a collection of items referenced by a numeric index.
What is a list?
Identify the letter printed from these lines of code:
str = 'CUPBOARD', what is str[1: 3]?
What is "UP"?
what is the difference between "/" and "//" in Python 3.0?
What is float division versus integer division?
"/" - Float Division
"//" - Integer Division
This function allows the the user to be enter some information and store it to a variable.
What is 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
What is 2400?
This command is used to stop the current iteration within a loop and proceed to the next statement outside the loop?
What is break?
Identify the letters printed from these lines of code: words = "GIS Rules!" print words[:-1]
What is "GIS Rules"?
To raise the number 5 to the power of 8, you must use the power operator. This/These symbol(s) denotes the power operator.
What are double asterisks "**"?
Data stored as a string is surrounded by these?
What are quotes?
What value will the variable count hold at the end of the following code?
count = 5
for i in range(3):
count = 2 * count
What is 40?
How many times will the letter A be printed in the following code?
for i in range(50):
if(i%10==0):
print("AA")
What is 10?
How to slice "World" from the following statement:
word = "Hello World"
What operator is used to return the remainder of a division operation?
What is modulus(%)?
To find the type of a variable, you would use this function.
What is type()?
The following Python code loops forever. What is it missing?
n = 10
while n<100:
print n
What is an increment statement?
n+=1
This built-in Python function returns the length of many objects, including Lists.
What is len()?
How to split the below string into a list of words, seperated by space?
words = "this is a nice jeopardy game"