{"id":65,"date":"2024-07-17T14:43:11","date_gmt":"2024-07-17T13:43:11","guid":{"rendered":"https:\/\/lingbites.com\/?page_id=65"},"modified":"2024-07-17T15:24:51","modified_gmt":"2024-07-17T14:24:51","slug":"exercises-basic-programming-concepts-in-scratch","status":"publish","type":"page","link":"https:\/\/lingbites.com\/index.php\/exercises\/exercises-basic-programming-concepts-in-scratch\/","title":{"rendered":"Exercises &#8211; Basic programming concepts in Scratch"},"content":{"rendered":"\n<p>Visit <a href=\"https:\/\/scratch.mit.edu\/projects\/1023039320\" target=\"_blank\" rel=\"noopener\" title=\"this page\">this page<\/a>\u00a0with a very simple game.<\/p>\n\n\n\n<p>You should first play through it twice.<\/p>\n\n\n\n<ol>\n<li>On the first time, press the green flag. When asked your name, type in &#8216;Lady Gaga&#8217;.<\/li>\n\n\n\n<li>On the second time, press the green flag again. When asked your name and age, type in your real name and age (or fake ones, as long as you don&#8217;t use Lady Gaga&#8217;s name).<\/li>\n<\/ol>\n\n\n\n<p>Then go\u00a0<a href=\"https:\/\/scratch.mit.edu\/projects\/1023039320\/editor\/\" target=\"_blank\" rel=\"noreferrer noopener\">here.<\/a>. This page shows the code underlying the game.<\/p>\n\n\n\n<p><strong>Part A.<\/strong>&nbsp;Complete the questions below. Have one representative in your group do the clicking, while others have the code open.<\/p>\n\n\n\n<p>To help you, here are some useful definitions:<\/p>\n\n\n\n<ul>\n<li>Assertion (or statements in mathematics): Something that can be true or false. e.g. 1 + 1 = 3 (false), Raccoons are mammals (true).<\/li>\n\n\n\n<li>Term: Something that can serve as an argument of an operator. In arithmetic these are generally quantities; in programming this can also be character strings, True\/False values, etc.<\/li>\n\n\n\n<li>Control statement: A statement that controls whether certain commands are performed, generally by checking whether some condition is true.<\/li>\n\n\n\n<li>Commands: An instruction for a computer to perform some task. Note that although terms are commands in many programming languages, they are not in Scratch.<\/li>\n<\/ul>\n\n\n\n<p><code><div class=\"h5p-iframe-wrapper\"><iframe id=\"h5p-iframe-24\" class=\"h5p-iframe\" data-content-id=\"24\" style=\"height:1px\" src=\"about:blank\" frameBorder=\"0\" scrolling=\"no\" title=\"Statements, commands, terms. Again, please take a screenshot before retries.\"><\/iframe><\/div><\/code><\/p>\n\n\n\n<ul>\n<li>Operators: Anything that takes&nbsp;<em>arguments<\/em>&nbsp;which are its terms and does something with them.<\/li>\n\n\n\n<li>Relational operators: An operator that compares two terms.<\/li>\n\n\n\n<li>Reciprocal operators: An operator where you can change the order of the terms and the result will be the same.<\/li>\n\n\n\n<li>Functions: A special kind of operator that does more complicated things after taking arguments. In programming, it usually contains a bunch of other commands that are performed whenever the function is used.<\/li>\n\n\n\n<li>Variables: Terms that can be set to different values. For example, x in algebra.<\/li>\n\n\n\n<li>Constants: Terms that have a fixed value. For example, 14 or pi.<\/li>\n<\/ul>\n\n\n\n<p><code><div class=\"h5p-iframe-wrapper\"><iframe id=\"h5p-iframe-22\" class=\"h5p-iframe\" data-content-id=\"22\" style=\"height:1px\" src=\"about:blank\" frameBorder=\"0\" scrolling=\"no\" title=\"Operators and terms\"><\/iframe><\/div><\/code><\/p>\n\n\n\n<p><strong>Part B.<\/strong><\/p>\n\n\n\n<ol>\n<li>What are some examples of discreteness and combinatorialism in Scratch code? [<em>Hint: Think about the language used in Scratch code, but also think about the shapes. If you look at the exercises above, is there anything that all elements in a particular box have in common?<\/em>]<\/li>\n\n\n\n<li>What are some examples of arbitrariness in Scratch code? [<em>Hint: What represent, terms, variables, constants, commands, and statements in Scratch?]<\/em><\/li>\n\n\n\n<li>What are some examples of abstractness in Scratch code? [<em>Hint: Looking at the first block of code, which line clearly does much more complicated things than the form of the code itself lets on?<\/em>]<\/li>\n\n\n\n<li>Are there any aspects of iconicity in Scratch code that you can find? How is it represented in other programming languages? [<em>Hint: In another programming language, the last line might be written as say(join(join(sentencepart1, sentencepart2), &#8220;!&#8221;)).<\/em>]<\/li>\n<\/ol>\n\n\n\n<p>[<em>Originally created for LING 15 with Prof Bob Kennedy.<\/em>]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Visit this page\u00a0with a very simple game. You should first play through it twice. Then go\u00a0here.. This page shows the code underlying the game. Part A.&nbsp;Complete the questions below. Have one representative in your group do the clicking, while others have the code open. To help you, here are some useful definitions: Part B. [Originally [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":18,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"footnotes":""},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/lingbites.com\/index.php\/wp-json\/wp\/v2\/pages\/65"}],"collection":[{"href":"https:\/\/lingbites.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/lingbites.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/lingbites.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lingbites.com\/index.php\/wp-json\/wp\/v2\/comments?post=65"}],"version-history":[{"count":1,"href":"https:\/\/lingbites.com\/index.php\/wp-json\/wp\/v2\/pages\/65\/revisions"}],"predecessor-version":[{"id":69,"href":"https:\/\/lingbites.com\/index.php\/wp-json\/wp\/v2\/pages\/65\/revisions\/69"}],"up":[{"embeddable":true,"href":"https:\/\/lingbites.com\/index.php\/wp-json\/wp\/v2\/pages\/18"}],"wp:attachment":[{"href":"https:\/\/lingbites.com\/index.php\/wp-json\/wp\/v2\/media?parent=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}