{"id":64,"date":"2024-08-22T08:54:21","date_gmt":"2024-08-22T08:54:21","guid":{"rendered":"https:\/\/learnx.ca\/mt\/?page_id=64"},"modified":"2025-08-18T07:42:38","modified_gmt":"2025-08-18T07:42:38","slug":"repeating-coding","status":"publish","type":"page","link":"https:\/\/learnx.ca\/mt\/repeating-coding\/","title":{"rendered":"CODING PUZZLES"},"content":{"rendered":"\n<p>[<a href=\"#s\">Solutions<\/a>&nbsp;are shown after the puzzles]<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>CODING PUZZLE 1: Patterns on number grid<\/strong><\/h4>\n\n\n\n<p>Go to <a href=\"https:\/\/bit.ly\/travels-1\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/bit.ly\/travels-1<\/a> . You will see this code:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"502\" height=\"204\" src=\"https:\/\/learnx.ca\/mt\/wp-content\/uploads\/2024\/08\/repeating-c1.png\" alt=\"\" class=\"wp-image-94\" style=\"width:597px;height:auto\" srcset=\"https:\/\/learnx.ca\/mt\/wp-content\/uploads\/2024\/08\/repeating-c1.png 502w, https:\/\/learnx.ca\/mt\/wp-content\/uploads\/2024\/08\/repeating-c1-300x122.png 300w\" sizes=\"auto, (max-width: 502px) 85vw, 502px\" \/><\/figure>\n\n\n\n<p><strong>1.<\/strong> Click on Run Code to see the pattern below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"301\" height=\"226\" src=\"https:\/\/learnx.ca\/mt\/wp-content\/uploads\/2024\/08\/repeating-c2.png\" alt=\"\" class=\"wp-image-95\"\/><\/figure>\n\n\n\n<p><strong>a) <\/strong>Describe the pattern.<\/p>\n\n\n\n<p><strong>b) <\/strong>Change the number 3 in <em>divided into groups of 3<\/em> to a different number and notice what changes.<\/p>\n\n\n\n<p><strong>2.<\/strong> Edit <em>divided into groups of 3<\/em> to create each of the following patterns.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"622\" height=\"233\" src=\"https:\/\/learnx.ca\/mt\/wp-content\/uploads\/2024\/08\/repeating-c3-4.png\" alt=\"\" class=\"wp-image-96\" srcset=\"https:\/\/learnx.ca\/mt\/wp-content\/uploads\/2024\/08\/repeating-c3-4.png 622w, https:\/\/learnx.ca\/mt\/wp-content\/uploads\/2024\/08\/repeating-c3-4-300x112.png 300w\" sizes=\"auto, (max-width: 622px) 85vw, 622px\" \/><\/figure>\n\n\n\n<p><strong>3.<\/strong> Make more edits to the code and notice what changes. Explain how the code works.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>CODING PUZZLE 2: More patterns on number grid<\/strong><\/h4>\n\n\n\n<p>Go to <a href=\"https:\/\/bit.ly\/travels-2\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/bit.ly\/travels-2<\/a> . You will see this code:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"509\" height=\"245\" src=\"https:\/\/learnx.ca\/mt\/wp-content\/uploads\/2024\/08\/repeating-c6.png\" alt=\"\" class=\"wp-image-99\" style=\"width:625px;height:auto\" srcset=\"https:\/\/learnx.ca\/mt\/wp-content\/uploads\/2024\/08\/repeating-c6.png 509w, https:\/\/learnx.ca\/mt\/wp-content\/uploads\/2024\/08\/repeating-c6-300x144.png 300w\" sizes=\"auto, (max-width: 509px) 85vw, 509px\" \/><\/figure>\n\n\n\n<p><strong>1. <\/strong>Click on Run Code to see the pattern.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"298\" height=\"224\" src=\"https:\/\/learnx.ca\/mt\/wp-content\/uploads\/2024\/08\/repeating-c7.png\" alt=\"\" class=\"wp-image-100\" style=\"width:347px;height:auto\"\/><\/figure>\n\n\n\n<p><strong>a)<\/strong> Describe the pattern.<\/p>\n\n\n\n<p><strong>b)<\/strong> Change the number 3 in <em>divided into groups of 3<\/em> to a different number and notice what changes.<\/p>\n\n\n\n<p><strong>2.<\/strong> Edit <em>divided into groups of 3<\/em> to create each of the following patterns.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"613\" height=\"226\" src=\"https:\/\/learnx.ca\/mt\/wp-content\/uploads\/2024\/08\/repeating-c8-9.png\" alt=\"\" class=\"wp-image-101\" srcset=\"https:\/\/learnx.ca\/mt\/wp-content\/uploads\/2024\/08\/repeating-c8-9.png 613w, https:\/\/learnx.ca\/mt\/wp-content\/uploads\/2024\/08\/repeating-c8-9-300x111.png 300w\" sizes=\"auto, (max-width: 613px) 85vw, 613px\" \/><\/figure>\n\n\n\n<p><strong>3. <\/strong>Make more edits to the code and notice what changes. Explain how the code works.<\/p>\n\n\n\n<p><strong>EXTENSIONS<\/strong><\/p>\n\n\n\n<p>Ask students to use the following blocks in their edits, and notice what changes.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"420\" height=\"99\" src=\"https:\/\/learnx.ca\/mt\/wp-content\/uploads\/2024\/08\/repeating-c11.png\" alt=\"\" class=\"wp-image-107\" srcset=\"https:\/\/learnx.ca\/mt\/wp-content\/uploads\/2024\/08\/repeating-c11.png 420w, https:\/\/learnx.ca\/mt\/wp-content\/uploads\/2024\/08\/repeating-c11-300x71.png 300w\" sizes=\"auto, (max-width: 420px) 85vw, 420px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading has-dark-gray-color has-text-color has-link-color wp-elements-fd657f999b5c075dfd639e73e4ea691e\" id=\"s\">SOLUTIONS<\/h1>\n\n\n\n<h4 class=\"wp-block-heading\">Coding Puzzle 1<\/h4>\n\n\n\n<p><strong>2. a)<\/strong>&nbsp; <em>divided into groups of 6<\/em><\/p>\n\n\n\n<p><strong>2. b)<\/strong>&nbsp; <em>divided into groups of 5<\/em><\/p>\n\n\n\n<p><strong>3.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"652\" height=\"461\" src=\"https:\/\/learnx.ca\/mt\/wp-content\/uploads\/2024\/08\/repeating-c5.png\" alt=\"\" class=\"wp-image-105\" srcset=\"https:\/\/learnx.ca\/mt\/wp-content\/uploads\/2024\/08\/repeating-c5.png 652w, https:\/\/learnx.ca\/mt\/wp-content\/uploads\/2024\/08\/repeating-c5-300x212.png 300w\" sizes=\"auto, (max-width: 652px) 85vw, 652px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">Coding Puzzle 2<\/h4>\n\n\n\n<p><strong>2. a)<\/strong>&nbsp; <em>set number to 31; repeat 30<\/em><\/p>\n\n\n\n<p><strong>2. b)<\/strong>&nbsp; <em>set number to 31; repeat 30; create green Gork behind number; set number background to orange<\/em> 3.<\/p>\n\n\n\n<p><strong>3.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"639\" height=\"519\" src=\"https:\/\/learnx.ca\/mt\/wp-content\/uploads\/2024\/08\/repeating-c10.png\" alt=\"\" class=\"wp-image-106\" srcset=\"https:\/\/learnx.ca\/mt\/wp-content\/uploads\/2024\/08\/repeating-c10.png 639w, https:\/\/learnx.ca\/mt\/wp-content\/uploads\/2024\/08\/repeating-c10-300x244.png 300w\" sizes=\"auto, (max-width: 639px) 85vw, 639px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Next:<\/strong> Coding puzzles &#8230; <a href=\"https:\/\/learnx.ca\/mt\/repeating-coding\/\">https:\/\/learnx.ca\/mt\/repeating-coding\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>[Solutions&nbsp;are shown after the puzzles] CODING PUZZLE 1: Patterns on number grid Go to https:\/\/bit.ly\/travels-1 . You will see this code: 1. Click on Run Code to see the pattern below. a) Describe the pattern. b) Change the number 3 in divided into groups of 3 to a different number and notice what changes. 2. &hellip; <a href=\"https:\/\/learnx.ca\/mt\/repeating-coding\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;CODING PUZZLES&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-64","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/learnx.ca\/mt\/wp-json\/wp\/v2\/pages\/64","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/learnx.ca\/mt\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/learnx.ca\/mt\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/learnx.ca\/mt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learnx.ca\/mt\/wp-json\/wp\/v2\/comments?post=64"}],"version-history":[{"count":18,"href":"https:\/\/learnx.ca\/mt\/wp-json\/wp\/v2\/pages\/64\/revisions"}],"predecessor-version":[{"id":808,"href":"https:\/\/learnx.ca\/mt\/wp-json\/wp\/v2\/pages\/64\/revisions\/808"}],"wp:attachment":[{"href":"https:\/\/learnx.ca\/mt\/wp-json\/wp\/v2\/media?parent=64"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}