Misc.
Lists/Dictionaries
Functions
Loops
Conditionals
100

What: type of data is shored in: name = 'Taylor'?

a string

100

How do I add something to the end of a list?

.append()

100

True or False: all functions are required to have return statements

def ___():

   return ______

False

100

What are the two types of loops which we have covered?

For and while loops

100

"if" and 'else' are two of the three possible conditional statements, what is the other one?

What is elif?

200

what will x be after this code? 

x = 5

x = x + 3

x = 8

200

How do I remove the last item from a list?

.pop()

200

def hello(msg):

    print('Hi ' + msg)

How would I output "Hi Friend!"

what is hello('Friend!')

200

candy = ['Chocolate', 'M&Ms']

for i in candy:

   print(i)

What is Chocolate, M&Ms?

200

x = 6

if x % 3 == 0:

   x = x / 3

print(x)

What is 2.0?

300

What is wrong with this line of code?

3x = 7

= represents assignment, no variable is being assigned

300

How do you get 'cherry' from this dictionary:

dict = {'vegetable': 'carrot', 'fruit':'cherry'}

dict['fruit']

300

while True:

     print('hi')

What is the issue?

infinite loop

400

txt = 'What's up'

for i in txt:

   print(txt)

What is the output?

'What's up'

'What's up'

'What's up'

'What's up'

'What's up'

'What's up'

'What's up'

'What's up'

'What's up'

'What's up'

400

What kind of datatypes can you store in a list (name 3)

string, float, integer

500

list = [1, 2, 4, 6, 8, 9]

How would I attain the string '8' from the list?

str(list[4])

500

list  = [90, 23, 56, 0]

How can I output: [90, 23, 56, 0, 90, 23, 56, 0, 90, 23, 56, 0]?

list *= 3, or list = list * 3