{"assignment":{"_schema_version":2,"course_id":37,"date_created":"2022-06-28T19:00:00+00:00","date_modified":"2023-09-10T12:53:35.927176+00:00","extra_instructor_files":"","extra_starting_files":"","forked_id":null,"forked_version":null,"hidden":false,"id":1158,"instructions":"{\n  \"settings\": {\n    \"readingId\": \"bakery_structures_dataclass_ops_read\"\n  },\n  \"questions\": {\n    \"ListDataclassOperators\": {\n      \"type\": \"multiple_answers_question\",\n      \"points\": 3,\n      \"body\": \"Which of the following operators work with dataclass instances?\",\n      \"answers\": [\n        \"Addition (`+`)\",\n        \"Subtraction (`-`)\",\n        \"Indexing (square brackets, `[]`)\",\n        \"Equality (`==`)\",\n        \"Comparison (`<`)\",\n        \"Modulo (`%`)\"\n      ]\n    },\n    \"DescribeDataclassInstanceEquivalency\": {\n      \"type\": \"multiple_choice_question\",\n      \"points\": 3,\n      \"body\": \"When are two instances equivalent?\",\n      \"answers\": [\n        \"Two instances are equivalent if they have the same values in their fields, even if the instances come from different dataclasses.\",\n        \"Two instances are equivalent if they come from the same dataclass and have the same values for their fields.\",\n        \"Two instances are equivalent if at least one value is the same in each\",\n        \"Two instances can never be equivalent; using `==` with instances will cause an error\",\n        \"Two instances can never be equivalent, but it does not cause an error to check\"\n      ]\n    },\n    \"AnnotateDataclassTypes\": {\n      \"type\": \"fill_in_multiple_blanks_question\",\n      \"points\": 3,\n      \"body\": \"Given the code below...\\n\\n```python\\nfrom dataclasses import dataclass\\nfrom bakery import assert_equal\\n\\n@dataclass\\nclass Fruit:\\n    kind: str\\n    sweetness: __1__\\n\\ndef is_sweet(fruit: __2__) -> __3__:\\n    return fruit.sweetness > 10\\n\\nassert_equal(is_sweet(Fruit(\\\"Orange\\\", 15)), True)\\nassert_equal(is_sweet(Fruit(\\\"Lemon\\\", 5)), False)\\n```\\n\\nWhat type should be put in the `__1__` blank? [fieldType]\\n\\nWhat type should be put in the `__2__` blank? [parameterType]\\n\\nWhat type should be put in the `__3__` blank? [returnType]\"\n    }\n  }\n}","ip_ranges":"","name":"4A2) Using Dataclasses","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_structures_dataclass_ops_quiz","version":5},"ip":"216.73.216.157","submission":{"_schema_version":3,"assignment_id":1158,"assignment_version":5,"attempts":0,"code":"","correct":false,"course_id":37,"date_created":"2026-05-20T14:01:38.573790+00:00","date_due":"","date_graded":"","date_locked":"","date_modified":"2026-05-20T14:01:38.573790+00:00","date_started":"","date_submitted":"","endpoint":"","extra_files":"","feedback":"","grading_status":"NotReady","id":2036895,"score":0.0,"submission_status":"Started","time_limit":"","url":"submission_url-6cead8e8-0134-40db-bfee-46d251aa618d","user_id":2044668,"user_id__email":"","version":0},"success":true}
