{"assignment":{"_schema_version":2,"course_id":37,"date_created":"2022-06-28T19:00:00+00:00","date_modified":"2022-09-22T21:53:36.749993+00:00","extra_instructor_files":"","extra_starting_files":"","forked_id":null,"forked_version":null,"hidden":false,"id":1163,"instructions":"{\n  \"settings\": {\n    \"readingId\": \"bakery_nesting_2d_lists_read\"\n  },\n  \"questions\": {\n    \"Write Nested Index Expressions\": {\n      \"type\": \"fill_in_multiple_blanks_question\",\n      \"points\": 3,\n      \"body\": \"Captain the Cat has created a treasure map using the following code:\\n\\n```python\\nsea = [\\n    [[\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\"]],\\n    [[\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\"]],\\n    [[\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf34\\\",\\\"\\ud83d\\udc8e\\\",\\\"\\ud83c\\udf0a\\\"]],\\n    [[\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\"]],\\n    [[\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\"]],\\n    [[\\\"\\ud83c\\udff4\\u200d\\u2620\\ufe0f\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\"]],\\n    [[\\\"\\ud83d\\udea2\\\",\\\"\\ud83d\\udc08\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83c\\udf0a\\\",\\\"\\ud83d\\udc20\\\"]],\\n]\\n```\\n\\nWrite the nested indexing expressions that will produce the following values:\\n\\n* `\\\"\\ud83c\\udf34\\\"`: [palmTree]\\n* `\\\"\\ud83d\\udc8e\\\"`: [treasure]\\n* `\\\"\\ud83d\\udea2\\\"`: [ship]\\n* `\\\"\\ud83c\\udff4\\u200d\\u2620\\ufe0f\\\"`: [pirateFlag]\\n* `\\\"\\ud83d\\udc20\\\"`: [fish]\"\n    },\n    \"Predict Indexing Type\": {\n      \"type\": \"matching_question\",\n      \"points\": 2,\n      \"body\": \"Given the following code...\\n\\n```python\\nscores = [ [5, 3, 4, 3],\\n           [7, 3, 4, 3],\\n           [5, 2, 3, 2]]\\n\\ntotal = 0\\nfor row in scores:\\n    for score in row:\\n        total = total + score\\n```\\n\\nWhat is the most accurate type for each of the following expressions?\",\n      \"answers\": [\n        \"int\",\n        \"list[int]\",\n        \"list[list[int]]\",\n        \"int[list]\",\n        \"str\"\n      ],\n      \"statements\": [\n        \"scores\",\n        \"scores[0]\",\n        \"scores[0][0]\",\n        \"row\",\n        \"score\",\n        \"total\"\n      ],\n      \"retainOrder\": true\n    },\n    \"Count Nested List Elements\": {\n      \"type\": \"fill_in_multiple_blanks_question\",\n      \"points\": 2,\n      \"body\": \"Given the following code...\\n\\n```python\\nscores = [[ [5, 3, 4, 3]],\\n           [[7, 3, 4, 3]],\\n           [[5, 2, 3, 2]] ]\\n```\\n\\n* How many lists are there? [countList]\\n* How many integers are there? [countIntegers]\\n* How many elements are in the `scores` list? [lengthList]\\n* How many integers are in the first inner list? [lengthFirstList]\"\n    },\n    \"Predict Nested Loop Pattern MinMax\": {\n      \"type\": \"short_answer_question\",\n      \"points\": 1,\n      \"body\": \"Given the following code...\\n\\n```python\\ndef beta(values: list[int]) -> int:\\n    result = values[0]\\n    for value in values:\\n        if value > result:\\n            result = value\\n    return result\\n\\ndef alpha(values: list[list[int]]) -> int:\\n    result = beta(values[0])\\n    for row in values:\\n        beta_row = beta(row)\\n        if beta_row < result:\\n            result = beta_row\\n    return result\\n    \\ngrades = [\\n    [90, 99, 95],\\n    [75, 50, 60],\\n    [80, 90, 100]\\n]\\n```\\n\\nWhat value will be produced when the expression `alpha(grades)` is evaluated?\"\n    },\n    \"Predict Nested Loop Pattern Find\": {\n      \"type\": \"multiple_choice_question\",\n      \"points\": 1,\n      \"body\": \"Given the following code:\\n\\n```python\\ndef foo(values: list[list[str]]) -> list[str]:\\n    result = []\\n    for row in values:\\n        result.append(bar(row))\\n    return result\\n    \\ndef bar(row: list[str]) -> str:\\n    result = \\\"\\\"\\n    for word in row:\\n        if word and word[-1] == \\\"?\\\":\\n            result = word\\n    return result\\n    \\nwords = [\\n    [\\\"Yes\\\", \\\"What?\\\", \\\"No\\\"],\\n    [\\\"Huh?\\\", \\\"Why?\\\", \\\"How?\\\"],\\n    [\\\"Oops\\\", \\\"All\\\", \\\"Gone\\\"]\\n]\\n```\\n\\nWhat value will be produced when the expression `foo(words)` is evaluated?\",\n      \"answers\": [\n        \"[\\\"Yes\\\", \\\"Huh?\\\", \\\"Oops\\\"]\",\n        \"[\\\"Yes\\\", \\\"What?\\\", \\\"No\\\"]\",\n        \"[\\\"Huh?\\\", \\\"Why?\\\", \\\"How?\\\"]\",\n        \"[\\\"What?\\\", \\\"Huh?\\\", \\\"\\\"]\",\n        \"[\\\"What?\\\", \\\"How?\\\", \\\"\\\"]\",\n        \"[]\",\n        \"[\\\"\\\", \\\"\\\", \\\"\\\"]\"\n      ]\n    }\n  }\n}","ip_ranges":"","name":"8B1) Nested Lists","on_change":"","on_eval":"","on_run":"","owner_id":1,"owner_id__email":"acbart@udel.edu","points":1,"public":true,"reviewed":false,"sample_submissions":[],"settings":"","starting_code":"","subordinate":false,"tags":[],"type":"quiz","url":"bakery_nesting_2d_lists_quiz","version":2},"ip":"216.73.216.157","submission":{"_schema_version":3,"assignment_id":1163,"assignment_version":2,"attempts":0,"code":"","correct":false,"course_id":37,"date_created":"2026-05-20T12:42:01.920897+00:00","date_due":"","date_graded":"","date_locked":"","date_modified":"2026-05-20T12:42:01.920897+00:00","date_started":"","date_submitted":"","endpoint":"","extra_files":"","feedback":"","grading_status":"NotReady","id":2036762,"score":0.0,"submission_status":"Started","time_limit":"","url":"submission_url-e74898f5-97ba-4412-bc53-7e18c93e2988","user_id":2044660,"user_id__email":"","version":0},"success":true}
