Basic Math
Variables
Flow Control
General Python
A Mix
100

What is the output of 

print(2 + 3 ** 2 - 12)?

What is -1?

100

This common variable type stores letters, numbers, and symbols.

What is a string?

100

This often used statement checks the validity of a statement before continuing

What is an 'if' statement?

100

To comment a line in Python, you use this/these character(s).

What is a pound sign (#) ?

100

When printing a string you use this to embed the variable

What is %s?

200

These characters have the highest order of operation in Python.

What are parenthesis?

200

This variable type stores decimal numbers.

What is a float?

200

This flow control statement loops through a set of statements if a test statement continues to evaluate to True.

What is a for or a while loop?

200

def addition(number1,number2):

In this example, number1 is an example of?

What is a parameter?

200

This is an if statement inside another if statement

What is a nested if statement?

300

The result of 9 / 5

What is 1?

300

This built in function allows user input text to be assigned to a variable.

What is input()?

300

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?

300

def findSum(number1,number2): sum = number1 + number 2 return sum This program does not run. What do you need to do to make it run?

What is call the function -- for example findSum(4,5)?

300

This operator checks to see if two items are not equal.

What is !=?

400

To raise the number 5 to the 8 power, using a Math method, write the code to do this and store the value in the variable number.

What is number = Math.pow(5,8)?

400

Data stored as a string is surrounded by these.

What are quotes?

400

sum = 0 

for number in range(1,3,1): 

sum += number 

print sum 

What is the value of sum at the end of the program?

What is 3?

400

This statement is used to both provide a result value for a function, and to go back to the statement immediately following the function call.

What is return?

400

This operation adds elements to a list.

What is append()?

500

What is 129 % 5 = ?

What is 4?

500

To print the output 1,3,5,7,9 what does a and b need to be in the following for loop?

for i in range(1,a,b):


What is 10 and 2?

500

The following Python code loops forever. What is it missing?

n = 10

while n<100:

print n

What is a increment statement (or n+=1 or n = n + 1)?

500

This built-in Python function returns the length of a string, amongst other things.

What is len()?

500

What characters do we use to find a character in a string or a variable in a list

What is square brackets []

M
e
n
u