Find the
Error
Fill in the
Blank
What's the
Output?
Fastest
Solution
Which input
breaks it?
100

Problem: Return True if n is even. Which line has the error?

A) Line 1   B) Line 2   C) Line 3   D) Line 4

Solution: B) Line 2

100

Problem: Return the biggest number in nums. Assume nums is not empty

(Ex: find_max([3, 9, 2]) == 9)

A) if n < biggest:   B) if n == biggest:   C) if n > biggest:

Solution: C) if n > biggest:

100

Problem: What does mystery(0) return?

A) False   B) True   C) 0   D) Error

Solution: A) False

100

Problem: Return True if n is even (n is 0 or more).

Which solution runs fastest?

A) Solution A   B) Solution B   C) Solution C

Solution: B) Solution B

100

Problem: Return the average of nums

A) []   B) [1, 2, 3]   C) [5]   D) [-1, 1]

Solution: A) []

200

Problem: Return the sum of every number in nums. Which line has the error?

A) Line 1   B) Line 2   C) Line 3   D) Line 4

Solution: D) Line 4

200

Problem: For 1 to n, say "Fizz" for multiples of 3, "Buzz" for multiples of 5, and "FizzBuzz" for multiples of both

A) if i % 3 == 0 and i % 5 == 0:   B) if i % 3 = 0 and i % 5 = 0:

C) if i / 3 == 0 and i / 5 == 0:

Solution: A) if i % 3 == 0 and i % 5 == 0:

200

Problem: What does this code print?

A) "lte"   B) "l" "t" "e"   

C) "lee"   D) "l" "e" "e"

Solution: A) "lte"

200

Problem: Return the last number in nums. Assume nums is not empty

Which solution runs fastest?

A) Solution A   B) Solution B   C) Solution C

Solution: C) Solution C

200

Problem: Return the biggest number in nums

A) [-3, 7, 2]   B) [5]   C) [0, 10]   D) [-4, -2, -9]

Solution: D) [-4, -2, -9]

300

Problem: Return how many numbers in nums are even. Which line has the error?

A) Line 1   B) Line 2   C) Line 3   D) Line 4

Solution: C) Line 3

300

Problem: Return how many vowels are in s. Assume lowercase letters only

(Ex: count_vowels("banana") == 3)

A) if ch == "aeiou":   B) if "aeiou" in ch:   C) if ch in "aeiou":

Solution: C) if ch in "aeiou":

300

Problem: What does mystery([5, 3, 8, 1]) return?

A) 17   B) 4   C) 10   D) 6

Solution: D) 6

300

Problem: Return a list where each spot is the sum of everything up to and including that spot 

(Ex: [1, 2, 3, 4] → [1, 3, 6, 10]) 

Which solution runs fastest?

A) Solution A   B) Solution B   C) Solution C

Solution: B) Solution B

300

Problem: Return the value of the middle number of nums. If there are two middle numbers, return the first one's value

A) [1, 2, 3]   B) [1, 2, 3, 4]

C) [0, 0]   D) [7]

Solution: B) [1, 2, 3, 4]

400

Problem: Return True if any number appears more than once. Which line has the error?

A) Line 2   B) Line 4   C) Line 6   D) Line 7

Solution: D) Line 7

400

Problem: Return True if s is a Palindrome (reads the same forwards and backwards). Assume lowercase letters only

(Ex: isPalindrome("tacocat") == True)

A) left, right = left + 1, right - 1   B) left, right = left + 1, right + 1

C) left, right = left - 1, right + 1

Solution: A) left, right = left + 1, right - 1

400

Problem: What does this code print?

A) "stack"   B) "ktacs"   C) "kcats"   D) "tacks"

Solution: C) "kcats"

400

Problem: Return True if any number appears more than once. 

Which solution runs fastest?

A) Solution A   B) Solution B   C) Solution C

Solution: A) Solution A

400

Problem: Return True if any number appears more than once

A) [1, 1, 2]   B) [1, 2, 3]   C) [1, 2, 1]   D) []

Solution: C) [1, 2, 1]

500

Problem: Reverse the list of characters s in place. Which line has the error?

A) Line 3   B) Line 4   C) Line 5   D) Line 7

Solution: A) Line 3

500

Problem: Return the indexes of the two numbers that add up to target. Assume exactly one pair adds up to target

(Ex: twoSum([2, 7, 11, 15], 9) == [0, 1])

A) if i + j == target:   B) if nums[i] + nums[j] == target:

C) if nums[i] == nums[j]:

Solution: B) if nums[i] + nums[j] == target:

500

Problem: What does mystery(14) return?

A) 5   B) 6   C) 7   D) 8

Solution: B) 6

500

Problem: Return the indexes of the two numbers that add up to target. Assume exactly one pair adds up to target

Which solution runs fastest?

A) Solution A   B) Solution B   C) Solution C

Solution: C) Solution C

500

Problem: Return two distinct indexes whose numbers add up to target. Assume exactly one pair adds up to target

(Ex: twoSum([1, 6, 9], 15) == [1, 2])

A) nums = [2, 7, 11, 15], target = 9   B) nums = [1, 5, 8], target = 13

C) nums = [1, 4], target = 5   D) nums = [3, 2, 4], target = 6

Solution: D) nums = [3, 2, 4], target = 6