<jupyter_start><jupyter_text>Quiz 1BEFORE YOU START THIS QUIZ:1. Click on "Copy to Drive" to make a copy of the quiz,2. Click on "Share",    3. Click on "Change" and select "Anyone with this link can edit"    4. Click "Copy link" and5. Paste the link into [this Canvas assignment](https://canvas.olin.edu/courses/313/assignments/4866). Copyright 2021 <NAME>, [MIT License](http://opensource.org/licenses/MIT)  Setup The following cells download a file that contains a list of words, reads the words, and stores them in a `set`.<jupyter_code>from os.path import basename, exists

def download(url):
    filename = basename(url)
    if not exists(filename):
        from urllib.request import urlretrieve
        local, _ = urlretrieve(url, filename)
        print('Downloaded ' + local)
    
download('https://github.com/AllenDowney/DSIRP/raw/main/american-english')
def read_words(filename):
    """Read lines from a file and split them into words."""
    res = set()
    for line in open(filename):
        for word in line.split():
            res.add(word.strip().lower())
    return res
word_list = read_words('american-english')
len(word_list)<jupyter_output><empty_output><jupyter_text>Question 1The following function takes a string and returns `True` if the letters in the string appear in alphabetical order.<jupyter_code>def is_alphabetical(word):
    return list(word) == sorted(word)
is_alphabetical('almost') # True
is_alphabetical('alphabetical') # False<jupyter_output><empty_output><jupyter_text>Make a new list called `alpha_words` that contains only the words in `word_list` that are alphabetical, and display the length of the list.  Question 2Find and display the longest word in `alpha_words`.If there is more than one word with the maximal length, you can display any one of them (but only one).NOTE: You can write code for this question even if your answer to the previous question doesn't work. I'll grade the code, not the output.  Question 3Write a function called `encompasses` that takes two words and returns `True` if the first word contains the second word, but not at the beginning or the end (and `False` otherwise). For example, `hippopotomus` encompasses the word `pot`.HINT: You might find the string method `find` useful.<jupyter_code>'hippopotomus'.find('pot')
'hippopotomus'.find('potato')
# WRITE YOUR FUNCTION HERE<jupyter_output><empty_output><jupyter_text>You can use the following examples to test your function.<jupyter_code>word1 = 'hippopotamus'
word2 = 'pot'
word3 = 'hippo'
word4 = 'mus'
word5 = 'potato'
encompasses(word1, word2) # True
encompasses(word1, word3) # False because word3 is at the beginning
encompasses(word1, word4) # False because word4 is at the end
encompasses(word1, word5) # False because word5 is not in word1<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09430604982206406, 'fraction_numerical': 0.013167259786476869, 'mean_word_length': 4.8684759916492695, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 18, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '113707', 'license': 'MIT', 'n_tokens_mistral': 867, 'n_tokens_neox': 842, 'n_words': 323, 'path': 'notebooks/quiz01.ipynb', 'repo_name': 'wilsonify/DSIRP', 'size': '2816'}