Tuples
Lists
Four Loops & Lists
List Methods
Functions
100

A tuple is an immutable, sequential data structure that can be of different data types.

What is a tuple?

100

This is a mutable data structure that holds ordered collection of data items.

What is a list?

100

The purpose of a for loop in Python.

What is to iterate over a sequence (like a list, tuple, or string) and execute a block of code each time?

100

This is method would you use to add several items to the end of a list.

What is extend () ?

100

A reusable block of code that performs a specific task and can take inputs, known as parameters, and return an output.

What is a function?

200

Placing a comma-separated list of values inside parentheses, like this: (1,2,3).

What is defining a tuple?

200

This is created when using empty square brackets like this [].

What is an empty list in Python?

200

The output of the following code?

   my_list = [1, 2, 3, 4]
   for num in my_list:
       print(num * 2)

What is 

2

4

6

8



200

This method takes out the first occurrence of a specified value from a list.

What is the remove () method?

200

This keyword is used to define a function in Python.

What is def?

300

The output of the following code: my_tuple = (1, 2, 3); print(my_tuple[1])?

What is 2 (because indexing in Python starts at 0)?

300

The output of the following code: my_list = [1, 2, 3]; print(my_list[2])

What is 3 (because indexing in Python starts at 0)?

300

This is the technique used to access the last element of a list.

What is -1 ?

300

This method would you use to sort a list in ascending order.

What is the sort() method?

300

This is the output for the following code:

def greet(name):
       return "Hello, " + name
   print(greet("Alice"))

What is "Hello, Alice"?

400

The reason you cannot modify an element in a tuple.

What is immutable?

400

The list method you would use to add an item to the end of a list.

What is the append() method?

400

The output of the following code?

   fruits = ['apple', 'banana', 'cherry']
   for fruit in fruits:
       print(fruit[0])

What is

a

b

c

400

This method would be used to change to order of elements in a list from front to back?

What is the reverse() method changes the order of elements in a list?

400

The output of the following code is:

def add(x, y):
       return x + y
   print(add(3, 5))

What is 8?

500

The difference between a tuple and a list in Python.

What is lists are mutable and use square brackets?

(Tuples use parenthesis).

500

The method you can use remove an item from a list by value.

What is using the remove() method? For example, my_list.remove(value).

500

This is how you would combine two lists together into one list.

 What is combine the lists using the + operator:

   combined_list = list1 + list2


500

The output for the following code:

   numbers = [5, 3, 9, 1]
   numbers.sort(reverse=True)
   print(numbers)

What is 

[9,5,3,1]

500

This is the syntax to call a function named my_function?

What is    my_function()   ?