> For the complete documentation index, see [llms.txt](https://programming.reedcwilson.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://programming.reedcwilson.com/lesson-2/questions-2.md).

# Questions

* True or False, modules are code that you import into your program for added

  functionality?
* Give an example of using the `math` module.
* How can you import all of module's functions into your program so you don't

  have to continually write `name_of_module.function()`?
* What does immutable mean?
* What is the difference between a list and a tuple?
* What is the difference between a list and a dictionary?
* How could you get the second-to-last item in a list?
* Do all of the items in lists or dictionaries have to be the same data type?
* Based on the following list, how could you get another list from index 2 to

  index 4?

```python
[5, 2, 3, 6, 8, 2]
```

* How could you check to see if `4` exists in the list above?
* Using the code below, what is the value of right\_answer?

```python
right_answer = [4, 2]
wrong_answer = right_answer
wrong_answer[1] = 5
```

* Using the code below, what is the value of spam?

```python
green_eggs = 'yum'
spam = 'weird'
my_plate = green_eggs
green_eggs = spam
spam = my_plate
```

* Suggest one way that you can avoid the problem of accidentally modifying a

  list you didn't mean to.
