Data Types & Operators
Conditionals
Strings
Error Handling
Lists
Program Structure
Basic Python & Console Interaction
Wager
100

This data type represents either True or False.

What is a Boolean?

100

This keyword is used to check a second condition only if the first if statement was False.

What is elif?

100

This function is used to find the total number of characters in a string.

What is len()?

100

This type of error occurs when you forget a colon or misspell a keyword like p r i n t.

What is a Syntax Error?

100

This method is used to add a new item to the very end of an existing list.

What is .append()?

100

This keyword is used to define a new function.

What is def?

100

This Python command is used to display text or variables on the screen.

What is print()?

100

This loop is best used when you know exactly how many times you want to repeat a block of code.

What is a for loop?

200

This operator (%) returns the remainder of a division problem.

What is modulo?

200

To check if two values are exactly equal, you must use this operator.

What is ==?

200

In the string name = "Python", this is the character located at name[1]

What is "y"?

200

This type of error occurs when the program is running and tries to perform an impossible operation, like dividing by zero.

What is a Runtime Error?

200

This is the index of the very first element in any Python list.

What is 0?

200

Python uses this type of whitespace to show which code belongs inside a function or a loop.

What is indentation?

200

This function always returns a value as a string, regardless of what the user types.

What is input()?

200

This function generates a sequence of numbers, often used in for loops.

What is range()?

300

This is the result of the expression 10 // 3 in Python.

What is 3?

300

This logical operator returns True only if both conditions being compared are True.

What is and?

300

This term describes the fact that strings cannot be changed once they are created.

What is immutable?

300

This block is used to "test" a piece of code that might cause an error without crashing the whole program

What is a try block?

300

This method removes and returns the last item in a list.

What is .pop()?

300

This is the name for the information passed into a function when it is called.

What are arguments or parameters?

300

This symbol is used to start a single-line comment in Python.

What is the hashtag/pound sign #?

300

To use functions like randint(), you must first include this line at the top of your program.

What is import random?

400

This Python operator is used to raise a number to a power (exponentiation)

What is **?

400

If you want a block of code to run only when a condition is not met, you use this operator.

What is not?

400

This method is used to return a version of a string where all letters are capitalized.

What is .upper()?

400

This block runs only if an error occurred in the preceding try block.

What is an except block?

400

To check if a specific value exists inside a list, you use this keyword.

What is in?

400

This keyword is used to send a value back from a function to the part of the program that called it.

What is return?

400

To convert a user's input into a number that can be used for math, you must wrap the input function in this.

What is int() or float()?

400

This is the result of type(3.14)

What is <class 'float'>?

500

These are the two primary types of numbers in Python; one is for whole numbers and the other is for decimals.

What are Integers and Floats?

500

This is the name for a conditional statement nested inside another conditional statement.

What is a nested conditional?

500

Using the syntax string[start:stop], this is the process of extracting a portion of a string.

What is slicing?

500

This error type occurs when you try to use the wrong data type.

What is a ValueError?

500

If a list has 5 elements, what is the index of the last element?

What is 4?

500

This term refers to where a variable can be seen or used within a program (e.g., local vs. global)

What is Scope?

500

In the CodeHS environment, this "character" (represented by a green icon) is often used to introduce basic programming concepts through movement commands.

Who is Karel?

500

This error type occurs when you try to use a variable that has not been defined yet.

What is a NameError?

1500

"Given the string s = "CodeHS", this is the exact output of the command print(s[2:5].upper())"

What is "DEH"?

M
e
n
u