# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

from gofer.ok import check

# ## P1: Create a list of your favorite things!
#
# The container name should be `my_favorite_things_lst` and the elements should be strings. Please add at least 3 elements.

# +

check('tests/lab3_p1.py')
# -

# ## P2: Update the list, insert and remove elements.
# Go through the following steps and update your list.

# P2a: my favorite thing is my dog, Waiola. Please add her name as the last element of the list.

# +

check('tests/lab3_p2a.py')
# -

# P2b: Ashley's favorite thing is her dog, Willie. Please insert his name to be the second element of the list. 

# +

check('tests/lab3_p2b.py')
# -

# P2c: Please update the third element of the list to be chocolate. :)

# +


check('tests/lab3_p2c.py')
# -

# P2d: Please delete the first element of the list. 

# +


# I'm not quite sure how to test this exercise without any prior knowledge of the list.
# -

# ## P3: List slicing

some_nums_lst = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]

# P3a: create a new list called sub_lst that contains every third element of `some_nums_lst`.

# +

check('tests/lab3_p3a.py')
# -

# P3b: Now sub_lst should be every second element in reversed order.

# +

check('tests/lab3_p3b.py')
# -

# P3c: Now sub_lst should be every 4th element starting from the third element of `some_nums_lst`.

# +

check('tests/lab3_p3c.py')
# -

# ## P4: Lists of lists

# P4a: create an empty list named `nested_lst`. The first element of this list should be `my_favorite_things_lst`, the second element should be `some_nums_lst`, the third element should be a list that contains two strings: your first and last names.

# +

check('tests/lab3_p4a.py')
# -

# P4b: Save the fifth element of the second list to the variable called `var1_` with the ending that properly describes the variable type.

# +

check('tests/lab3_p4b.py')
# -

# P4c: Create a `first_name_str` variable and assign your first name from `nested_lst` to it.

# +


check('tests/lab3_p4c.py')
# -



StarcoderdataJupyterScriptsDedupFiltered