Functions
Variables
Lists
Loops/Ifs
Miscellaneous
100

What does print do?

Displays whatever is entered into the terminal

100

What is the = sign called?

Assignment operator

100

What characters symbolize the creation of a list?

[]

100

How many elifs can exist at the same time?

as many as you want

100
What does ** mean?

exponents

200

What does range(n) give you?

A list containing all the numbers from 0 to n-1

200

What is the data type for the following values?

"Hello", 100.0, 1000, "1000"

String, float, int, String

200

How do you access a certain element at a position in a list?

list_name[index_number]

200

What are the components of a for loop?

loop control variable and an iterable value

200

What is the difference between in and is?

in checks membership, is checks if the two value types are the same.

300

Does print have effects on the code?

No

300

Which function do we use to get the variable type of a variable?

type()

300

How do you add an element to the end of a list?

list.append(value)

300

What determines the number of times a for loop will run?

Length of the iterable value

300

What is the difference between or and and?

and requires both boolean expressions to be true, while or requires only one to be true.

400
What does the prompt in input(prompt) do?
It gets printed out to the terminal
400

What are the compound (or iterable) variable types we know right now?

Strings and Lists.

400

list1 = [0, 1, 1, 2, 3, 5, 8, 13]
list1.remove(2)
del list1[0]
list1.appen(4)
list1.sort()

what is the result?

[1, 1, 3, 4, 5, 8, 13]

400
What is put right after the if when writing an if statement? 


i.e. if _____, what do you put there?

A boolean expression

400

What does ord() and chr() do respectively?

ord() converts a character to the ascii number, chr() converts the ascii number to the character.

500

What is the value type of the value given by input()?

String

500

Can lists contain multiple data types. So, is the following list [1, "Hello", True, 0.0] valid?

Yes

500

What is the difference between

list.remove() and del list[number]

remove removes the first element with a value, del removes the element at a certain position.

500

How does a for loop work?

The loop control variable will take on each specific value of the iterable value in order each time the loop runs.

500

x = 1

y = 2

z = 3

bool = ((x == y or z == y) or (x == 1 and z == 2)) and (True)

What is the result?

False