Variables & Types
Math & Operators
String Methods
Functions: The Basics
More About Functions
100

This is the standard naming convention for Python variables (e.g., user_name).

Snake Case

100

This operator returns the remainder of a division.

Modulus (%)
100

This method replaces a specified phrase with another specified phrase.

.replace()

100

You use this keyword to start the definition of a function.

def

100

The specific values you pass into a function when calling it.

Arguments

200

This function is used to find out the data type of a variable.

type()

200

The operator ** is used to calculate this.

Exponentiation (will accept power or exponents)

200

This method converts the entire string to uppercase.

.upper()

200

These must follow the function name and contain any parameters.

Parentheses ()

200

The keyword used to send a value back to the caller.

return

300

This is the result of type(5 / 2). (Hint: Pay attention to the sign)

float

300

In 10 // 3, this is the resulting value.

3 (floor division)

300

This method removes whitespace from the start and end of a string.

.strip()

300

This refers to the indented block of code that belongs to a function.

Function body

300

A function that does not have a return statement technically returns this.

Nothing/None
400

Changing a variable from one type to another (like str(10)) is called this.

Type Casting

400

The result of 10 + 2 * 3 based on Python's order of operations.

16

400

This method checks if a string starts with a specific character or prefix.

.startswith()

400

To execute a function, you must do this to it by using its name and parentheses.

Call or Invoke the function

400

These are the variable names listed in the function definition.

Parameters
500

This "collection" type is an ordered, changeable sequence of elements.

List

500

This function returns the absolute value of a number.

abs()

500

This method returns the index of the first occurrence of a specified value.

.find() or .index()

500

This "placeholder" keyword allows you to define an empty function without an error.

pass

500

What is the value of output in the following program?

def calculate_power_plus(base, exponent, bonus=5):
    result = (base ** exponent) + bonus
    return result 

# Calling the function
output = calculate_power_plus(3, 2, 10)  

19

M
e
n
u