{"assignment":{"_schema_version":2,"course_id":37,"date_created":"2022-06-28T19:00:00+00:00","date_modified":"2022-07-12T14:55:22.921212+00:00","extra_instructor_files":"","extra_starting_files":"","forked_id":null,"forked_version":null,"hidden":false,"id":982,"instructions":"{\n  \"settings\": {\n    \"readingId\": \"bakery_functions_defining_read\"\n  },\n  \"questions\": {\n    \"FunctionLabeling\": {\n      \"type\": \"matching_question\",\n      \"points\": 3,\n      \"body\": \"Identify each part of the function and its call:\\n\\n![Code annotated with numbers][3]\\n\\n   [3]: https://i.imgur.com/rNCjHXG.png\",\n      \"answers\": [\n        \"Definition keyword\",\n        \"Function name\",\n        \"Parameter name\",\n        \"Parameter type\",\n        \"Parentheses\",\n        \"Dash and greater than arrow\",\n        \"Return type\",\n        \"Colon\",\n        \"Body\",\n        \"Return value\",\n        \"Argument\"\n      ],\n      \"statements\": [\n        \"1\",\n        \"2\",\n        \"3\",\n        \"4\",\n        \"5\",\n        \"6\",\n        \"7\",\n        \"8\",\n        \"9\",\n        \"10\",\n        \"11\"\n      ]\n    },\n    \"FunctionHeaderColon\": {\n      \"type\": \"short_answer_question\",\n      \"points\": 1,\n      \"body\": \"Type the symbol that goes at the end of the function definition's header.\"\n    },\n    \"PassStatement\": {\n      \"type\": \"multiple_choice_question\",\n      \"points\": 1,\n      \"body\": \"What does the `pass` statement do?\",\n      \"answers\": [\n        \"Passes a value to a function\",\n        \"Absolutely nothing\",\n        \"Passes the result of the function back to where it was called.\"\n      ]\n    },\n    \"AdvantagesOfFunctions\": {\n      \"type\": \"multiple_answers_question\",\n      \"points\": 1,\n      \"body\": \"Mark all of the following that ARE advantages of functions.\",\n      \"answers\": [\n        \"Make it easy to reuse code\",\n        \"Code in a function executes faster\",\n        \"Easier to debug code in a function because it is isolated\",\n        \"Functions allow us to store values in variables.\"\n      ]\n    },\n    \"IdentifyFunctionName\": {\n      \"type\": \"short_answer_question\",\n      \"points\": 1,\n      \"body\": \"Given the function definition below, what is the name of the function?\\n```python\\ndef get_area(width:int, height:int) -> int:\\n    return width*height\\n```\"\n    },\n    \"IdentifyFunctionReturnType\": {\n      \"type\": \"multiple_choice_question\",\n      \"points\": 1,\n      \"body\": \"What type of thing is returned from the function below?\\n```python\\ndef is_on_fire() -> bool:\\n    return True\\n```\",\n      \"answers\": [\n        \"Boolean\",\n        \"String\",\n        \"Function\",\n        \"None\",\n        \"True\",\n        \"False\"\n      ]\n    },\n    \"FunctionPossibleReturnTypes\": {\n      \"type\": \"true_false_question\",\n      \"points\": 1,\n      \"body\": \"Every function must return an integer or string.\"\n    },\n    \"FunctionRequiresNames\": {\n      \"type\": \"true_false_question\",\n      \"points\": 1,\n      \"body\": \"Every function defined with the \\\"def\\\" keyword MUST have a name.\"\n    },\n    \"MeaningOfDefKeyword\": {\n      \"type\": \"true_false_question\",\n      \"points\": 1,\n      \"body\": \"The keyword \\\"def\\\" is short for \\\"define\\\".\"\n    },\n    \"TracingFunctions\": {\n      \"type\": \"fill_in_multiple_blanks_question\",\n      \"points\": 3,\n      \"body\": \"Read the following code, and then fill in the blanks below.\\n```python\\n1| def f(x:int) -> int:\\n2|     x = x + 1\\n3|     return x\\n4| val = 0  \\n5| y = f(val)\\n6| print(y)\\n```\\n\\n  * What line is executed first? [first]\\n  * What line is executed second? [second]\\n  * After line 3 is executed, what will be the next line executed? [last]\\n\\nYou can run the code on [PythonTutor](http://www.pythontutor.com/visualize.html#code=def%20f%28x%3Aint%29%20-%3E%20int%3A%0A%20%20%20%20x%20%3D%20x%20%2B%201%0A%20%20%20%20return%20x%0Aval%20%3D%200%0Ay%20%3D%20f%28val%29%0Aprint%28y%29&cumulative=false&curInstr=0&heapPrimitives=false&mode=display&origin=opt-frontend.js&py=3&rawInputLstJSON=%5B%5D&textReferences=false) to step through and see what\\nhappens.\"\n    },\n    \"GoodValidPythonNames\": {\n      \"type\": \"multiple_answers_question\",\n      \"points\": 3,\n      \"body\": \"You have been tasked with creating a function that opens a garage door. Which of the following are good, valid names?\",\n      \"answers\": [\n        \"ogd, a short abbreviation that saves many letters when typing.\",\n        \"open_garage_door, a concise name that captures the idea\",\n        \"open garage door, a concise name that captures the idea\",\n        \"door, a short name that saves many letters while typing\",\n        \"openThePodBayDoorsHal, a fun reference to a classic sci-fi movie\"\n      ]\n    }\n  }\n}","ip_ranges":"","name":"2A3) Defining Functions","on_change":"","on_eval":"","on_run":"","owner_id":1,"owner_id__email":"acbart@udel.edu","points":1,"public":true,"reviewed":false,"sample_submissions":[],"settings":null,"starting_code":"","subordinate":false,"tags":[],"type":"quiz","url":"bakery_functions_defining_quiz","version":1},"ip":"216.73.216.157","submission":{"_schema_version":3,"assignment_id":982,"assignment_version":1,"attempts":0,"code":"","correct":false,"course_id":37,"date_created":"2026-05-20T16:04:51.932902+00:00","date_due":"","date_graded":"","date_locked":"","date_modified":"2026-05-20T16:04:51.932902+00:00","date_started":"","date_submitted":"","endpoint":"","extra_files":"","feedback":"","grading_status":"NotReady","id":2037051,"score":0.0,"submission_status":"Started","time_limit":"","url":"submission_url-d03e7b81-74ab-480d-af71-076bf6e0a909","user_id":2044700,"user_id__email":"","version":0},"success":true}
