Functions
Words
Datatypes
Chaos
Perfection
0

300 - 20 seconds

The terms/words for the required parts of a function

Get 5 to get the points

What is ...

def, function name, parameters, colon, indentation, function signature, code block

0

500 - 30 seconds

The value and datatype of: (-2**2 + 3 * 3)/2 + (not False or True and True)

What is 3.5 and float?

0

100 - 10 seconds

Collection of items with no order between them

What are sets

0

200 - 15 seconds

The difference between syntax and semantics

What is the grammar of code vs. the meaning of code?

0

300 - 20 seconds

The function for executing a specified function on all items of an iterable

What is map()

0

300 - 20 seconds

The keywords which "disrupt" the natural flow of iteration code blocks

What is continue and break?

0

300 - 20 seconds

The 3 known set operations (symbol AND name)

What is intersection, union, and difference (& | -)

0

200 - 15 seconds

The placeholder for no code (but no error for empty)

What is pass

0

500 - 30 seconds

The base case and recursive step for a palindrome checker pali(s)

What is ...

if len(s) < 2:

    return True

return s[0] == s[-1] and pali(s[1:-1])

0

400 - 25 seconds

The base case and recursive step for a factorial function fact(n)

What is ...

n == 1:

    return 1

return n*fact(n-1)

0

500 - 60 seconds max

Pictionary Time!

Pick a team member who will come up to the whiteboard to draw ... (topic, term, keyword, who knows)

No words, only visual explanation

What is binary search

0

200 - 15 seconds

The allowed datatypes for dictionary values

What is any

0

400 - 25 seconds

The purpose of * and ** in function parameters

What is ...

multiple argument collection

multiple keyword argument collection

0

200 - 15 seconds

The expression for a list comprehension of squared numbers from 1 to n

What is [i**2 for i in range(1, n+1)]?

0

400 - 25 seconds

The value of (True and (False or True and True) or False) / 2

What is 0.5?

0

300 - 20 seconds

The string that ... returns

a = "appletree"

for i in range(1, len(a), 2):

    a[i] = "d"

return a

What is ...

str doesn't support item assignment

OR

error

0

400 - 25 seconds

4 built-in functions that work on all sequence types

What is ...

any, all, max, min, sorted, len

0

500 - 30 seconds

The formats of comprehension depending on conditional(s)

What is ...

[x for x in seq]

[x for x in seq if x ...]

[x if x ... elif x ... else ... for x in seq]?

0

300 - 20 seconds

An iterative approach to access every other element of a sequence

What is ...

for i in range(0, len(seq), 2):

or

while i < len(seq):

    i += 2

0

200 - 15 seconds

The placeholder for the absence of a value

What is None

0

200 - 15 seconds

The single most important info to remember about dictionary keys

What is uniqueness

0

BONUS! - 60 seconds

Both teams come up with a Jeopardy question/trivia related to iteration

If the other team answers it, they get 400 points, if they can't within 25s, they lose points

The other team can petition it was too difficult, and I can waive the point loss, up to my discretion :)

What is ...

I have run out of very hard iterative trivia