{"assignment":{"_schema_version":2,"course_id":37,"date_created":"2022-06-28T19:00:00+00:00","date_modified":"2023-08-26T14:03:07.068299+00:00","extra_instructor_files":"","extra_starting_files":"","forked_id":null,"forked_version":null,"hidden":false,"id":935,"instructions":"## Sequential Execution\n\n```python step-by-step\ncount = 0                # Step 1\nprint(count)             # Step 2\ncount = count + 5        # Step 3\ncount = count + 2        # Step 4\nprint(count)             # Step 5\n```\n\nPrograms execute line by line, one step at a time.\nMany times, the programs run super-fast and you won't see this behavior.\nWe have some tools that let us slow down and follow the execution.\nBut even when we use these tools, programs still only run one line at a time.\n\n## Metaphor\n\n![A picture of a person reading a book, with an arrow pointing down the page.](intro_modules_reading.png)\n\nThink about reading a book or acting out a script, how we move down a page.\nThis is the same way a program is read: from top to bottom, line by line.\n\n## Time\n\n![A clockwatch is next to some lines of code. Below the lines of code, annotations indicate how long the code took to run for each line.](intro_modules_time.png)\n\nThe result of this step-by-step instruction is that programs are executed over time.\nAlthough execution happens very, very fast, it does not happen all at once.\nTime is a crucial component in running programs.\n\n## Statements\n\n```python example-statements\n# Assignment statement\ncount = 5\n\n# Print statement\nprint(count)\n```\n\nA single line of code is known as a _statement_.\n_A program is really a collection of statements._ We call this collection the \"body\" of a program.\nThere are many kinds of statements, but we only know about a few so far.\n\n## Expressions\n\n* Literal values: `5`, `10.0`, `True`, `\"Hello\"`, `None`  \n* Math operations: `1 + 2`, `4 - 5`, `8 / 4`  \n* Logic operations: `5 > 4`, `False or not True`  \n* Variables: `age`, `score`, `my_string_variable`\n* Nested expressions: `(1 + 5) > age and not True`\n\nAn expression is any kind of combination of literal values, math operators, comparison operators, Boolean operators, and variables.\nAny value is an expression.\nAny variable is an expression.\nExpressions can be made up of expressions.\n\n## Connecting Statements and Expressions\n\n![On the left, a picture of BlockPy statement blocks highlighting that they have vertical notches (an assignment block and a print block).  On the right, a picture of BlockPy expression blocks highlighting that they have only a rounded connecting edge on the left (an addition block, a string value block, and a number value block).](intro_modules_statements_expressions_blocks.png)\n\nIf you imagine the code as blocks, you can see that expression blocks have a rounded left edge.\nStatement blocks have a pointy bit on the bottom and a notch on the top.\nThis visually shows you the difference between statements and expressions.\nStatements can have expressions inside, and expressions can have other expressions inside.\nHowever, _expressions cannot have statements inside of them_.\n\n## Order is Important\n\n![A picture of a confused person looking at a series of book chapters out of order: \"Chapter 15\", \"Chapter 1\", \"Prologue\", \"Chapter 5\".](intro_modules_order_matters.png)\n\nSince programs run from top to bottom, the order of statements is important.\nIf you rearranged the sentences of a book at random, they wouldn't make much sense - the same is true for programs.\nThink very carefully about the order of the statements in your program!\n\n## Summary\n\n- Python programs are made of a sequence of statements.\n- A statement is composed of expressions, which can have expressions nested inside of them.\n- Programs are usually read and executed top to bottom like sentences in a book.\n- Although computers execute programs quickly, programs are still always executed one step at a time.\n- The order of execution is very important for programs, so programmers must be careful to put every statement and expression in precise order.","ip_ranges":"","name":"1B3) Modules Reading","on_change":"","on_eval":"","on_run":"","owner_id":1,"owner_id__email":"acbart@udel.edu","points":0,"public":true,"reviewed":false,"sample_submissions":[],"settings":"{\n  \"header\": \"Modules\",\n  \"slides\": \"bakery_intro_modules.pdf\",\n  \"youtube\": {\n    \"Bart\": \"n_-r45H6P08\",\n    \"Amy\": \"_t1RIhD_bSU\"\n  },\n  \"video\": {\n    \"Bart\": \"https://blockpy.cis.udel.edu/videos/bakery_intro_modules-Bart.mp4\",\n    \"Amy\": \"https://blockpy.cis.udel.edu/videos/bakery_intro_modules-Amy.mp4\"\n  },\n  \"summary\": \"In this lesson, you will learn how programs are composed of statements and expressions into modules.\",\n  \"small_layout\": true\n}","starting_code":"","subordinate":true,"tags":[],"type":"reading","url":"bakery_intro_modules_read","version":8},"ip":"216.73.216.157","submission":{"_schema_version":3,"assignment_id":935,"assignment_version":8,"attempts":0,"code":"","correct":false,"course_id":37,"date_created":"2026-05-20T16:04:50.930841+00:00","date_due":"","date_graded":"","date_locked":"","date_modified":"2026-05-20T16:04:50.930841+00:00","date_started":"","date_submitted":"","endpoint":"","extra_files":"","feedback":"","grading_status":"NotReady","id":2037049,"score":0.0,"submission_status":"Started","time_limit":"","url":"submission_url-6d538b82-ff88-4a6b-be34-f5dc97cbed41","user_id":2044700,"user_id__email":"","version":0},"success":true}
