Boolean
Strings
Lists
Conditional Statements
Misc.
100

What will this return: 

(not True) or (not False)


True

100

a = "You’re a wizard Harry"

print(a[9:])

What will this print?


wizard Harry


100

thislist = ["apple", "banana", "cherry"]

print(thislist[1])

banana

100

What is the format of an if-else statement?

if <expression>:

    <suite>

elif <expression>:

    <suite>

else:

    <suite>


100

What do you use to create multiline strings?

Three quotations 

120

What will this return: 

(False or (not False)) and True


True

120

To concatenate, or combine, two strings you can use the + operator.

a = "Hello"

b = "World"

c = a + b

print(c)

HelloWorld


120

thislist = ["apple", "banana", "cherry"]

print(thislist[-1])

cherry

120

What is the format of a while loop?

while <expression>:

    <suite>


120

What keyword do you use to return something within a function?

return

140

Which boolean operator evaluates a and b, True if a is equal to b, else False


==

140

a = "Harry Potter"

print(len(a))


12

140

thislist = ["apple", "banana", "cherry", "orange", "kiwi", "melon", "mango"]

print(thislist[:4])


["apple", "banana", "cherry", "orange"]

140

What is the format of a for-loop?

for i in <expression>:

    <suite>


140

What keyword do you use to define a function?

def

160

What will this return: False or True and False

False 

160

What function do you use to concatenate strings?

+

160

thislist = ["apple", "banana", "cherry"]

thislist[1] = "blackcurrant"

print(thislist)


["apple", "blackcurrant", "cherry"]

160

How do you get user input?

input()

160

What boolean operator do you use to check if an item is in a list?

in

180

Which boolean operator does the following: 

Evaluate the subexpression <left>.

If the result is a true value v, then the expression evaluates to v.

Otherwise, the expression evaluates to the value of the subexpression <right>.


or
180

When slicing strings, does the start index always have to be smaller than the end index?

Yes

180

What functions do you use to add items to a list?

insert, append

180

What does the word break do to a loop?

ends

180

What is the boolean operator to check if things are not equal?

!= 

not and ==

M
e
n
u