COMMON PROBLEMS
TRY, TRY, TRY AGAIN
COMMON PROBLEMS 2
FILE THIS AWAY
DUCKS
300

The result of len() on a NumPy 2D array

What is the number of array rows?

300

The keyword that runs code no matter whether there is an error or not

What is finally?

300

The answer to this math problem: 

10 / 2 + 4 * 8 - 2 ** 3

What is 29?

300

The two file access modes to create text files in Python

What are 'w' (write) and 'a' (append)?

300

The term for using a duck to help with your code

What is "rubber duck debugging"

600

The result of 28 % 3

What is 1?

600

In Python error catching code, you can have as many of this keyword as you need

What is "except"?

600

The slice of the list, mylist = ["cat", "dog", 7, 55.5, "rat", "puppy"], that will give us [55.5, 'rat']

What is [3:5]?

600

The special term used for a character that separates columns of data in a file

What is a "delimiter"?

600

In the Holy Grail clip, Sir Bedivere said that someone was made of wood if they weighed the same as this.  

What is a duck?

900

The year the term "Artificial Intelligence" was coined.

What is 1956 (by John McCarthy of Dartmouth College)?

900

The result of the following code when 2 is entered

What is "Success"

900

The difference between a void and valued function

What is only valued functions return a value?

900

This is very important to do when you are done with a file

What is close it?

900

The term for a male duck

What is a drake?

1200

The answer to this math problem: 

18 - 2 * (5 + 4) / 3

What is 12?

1200

The name for a runtime error in Python code (the thing we "catch")

What is an exception?

1200
The way to take the log base 5 of 7

What is log(7,5)?

1200

The argument used in a NumPy file read function when we only want certain columns of data

What is 'usecols'?

1200

Comb, musk, garganey, torrent, and baikal are all types of this.

What are ducks?

1500

The slice of the string "Spam, Eggs, Sausage and Spam" that will give the word "Eggs"

What is [6:10]?

1500

The result of the following code when "one" is entered

What is "Error"?

1500

The slice that gives us the bottom left 2x3 square of this 2D array:

What is [2:, :3] or [2:4, 0:3] or [-2:, :3]?

1500

The function to read structured data into a NumPy array, AND the 5 arguments we talked about in class that we need to customize.

What is np.loadtxt(filename, delimiter=',', skiprows=1, usecols=(0,2), dtype=int) ?

1500

The Sesame Street character that popularized rubber ducks by singing about them in the bathtub.

Who is Ernie?

M
e
n
u