Basic Python
Lists, Arrays, and DataFrames
Functions, Conditionals, and Iteration
Visualization
Data Collection
100

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

What is #?

100

This commonly used Python data structure is created using [] and contains a collection of items of any data type referenced by a numeric index.

What is a list?

100

This/These symbol(s) is/are used to check if two expressions are NOT EQUAL to each other.

What is !=?

100

Used to describe trends over time

What is a line graph?

100

A survey of every unit – or individual member – of a population is known as this.

What is a census?

200

To raise the number 5 to the power of 8, you must use the power operator. This/These symbol(s) denote the power operator.

What are two asterisks (**) ?

200

The expression my_list[3] gives you this element of the list: my_list = [4,5,6,7,8]

What is 7?

200

The following function definition is missing something. What is it?

def function_name(input_arguments)
    """ Documentation on what your function does """
    body of function
    return output

A colon (:) after the first line

200

Used to show relationships between numeric variables

What is a scatterplot?

200

Another term for common response

What is confounding?

300

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

What is a string?

300

The following code produces this output.

arange(4,11,2)

What is an array with numbers 4,6,8,10?

300

This is the result of calling the following function on the input: 8

def my_func(x):

     ''' my docstring '''
    if type(x) == str:
        return "string"

    elif x % 3 == 0:
        return "divisible by 3"
    else:
        return "dunno"    

What is "dunno"?

300

Used for displaying the distribution of a set of continuous numeric data

What is a histogram?

300

This occurs when the people who decline to respond are different in some meaningful way than those who do respond

What is non-response bias?

400

This built-in Python function returns the length of many objects, including Lists

What is len()?

400

This pandas method returns the number of rows and columns of a DataFrame

.shape()

400

To make this code print 15 times, X must be replaced by this number.

for i in arange(5):

     for j in arange(X):

          print(i,j)

What is 3?
400

This is the default plot made by calling .plot() on a pandas DataFrame.

What is a line graph?

400

When conducting an experiment, this provides a comparison to better understand the effect of the independent variable

What is a control group?

500

This operator "glues" two strings together.

What is the concatenation (+) operator?

500

A pandas function used for cross classification of two variables in a DataFrame

What is pivot_table?

500

This portion of your function definition is displayed when you call the help() function on your function name.

What is the docstring?

500

The principle of graphs that this image violates


What is the Area Principle?

500

This is often used by researchers to ensure there is no systematic difference between groups other than the treatment and therefore no alternate cause for the relationship between treatment and outcome

What is randomization

M
e
n
u