{"id":16,"date":"2024-10-18T13:19:25","date_gmt":"2024-10-18T13:19:25","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/g_bryant\/?p=16"},"modified":"2024-10-18T13:19:25","modified_gmt":"2024-10-18T13:19:25","slug":"int-division-modus","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/g_bryant\/2024\/10\/18\/int-division-modus\/","title":{"rendered":"int\/\/division modus"},"content":{"rendered":"\n<p>sep 26 2024<\/p>\n\n\n\n<p>for my free friday project, i made a sylladex modus, based on integer division.<br>it&#8217;s very similar to dave&#8217;s hash map modus, adding up numbers based on the letters in the word and dividing them to fit in the sylladex.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69eaa24a0881e&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69eaa24a0881e\" class=\"wp-block-image size-full is-resized wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"649\" height=\"23\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/theroyalscode.com\/students\/g_bryant\/wp-content\/uploads\/2024\/09\/image.png\" alt=\"\" class=\"wp-image-17\" style=\"width:733px;height:auto\" srcset=\"https:\/\/theroyalscode.com\/students\/g_bryant\/wp-content\/uploads\/2024\/09\/image.png 649w, https:\/\/theroyalscode.com\/students\/g_bryant\/wp-content\/uploads\/2024\/09\/image-300x11.png 300w\" sizes=\"auto, (max-width: 649px) 100vw, 649px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<p>i created a default sylladex (above), and an input area with couple commands (below)<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69eaa24a08bbd&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69eaa24a08bbd\" class=\"wp-block-image size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"940\" height=\"274\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/theroyalscode.com\/students\/g_bryant\/wp-content\/uploads\/2024\/09\/image-2.png\" alt=\"\" class=\"wp-image-19\" srcset=\"https:\/\/theroyalscode.com\/students\/g_bryant\/wp-content\/uploads\/2024\/09\/image-2.png 940w, https:\/\/theroyalscode.com\/students\/g_bryant\/wp-content\/uploads\/2024\/09\/image-2-300x87.png 300w, https:\/\/theroyalscode.com\/students\/g_bryant\/wp-content\/uploads\/2024\/09\/image-2-768x224.png 768w\" sizes=\"auto, (max-width: 940px) 100vw, 940px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<p><br>as described above, when you put in a number, it will take that number, integer divide it by the number of used spots in your sylladex, and then it will mod it by the total number of spaces in your sylladex.<\/p>\n\n\n\n<p>the reset command specifically was difficult, due to an issue with lists in Python.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69eaa24a08f4b&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"69eaa24a08f4b\" class=\"wp-block-image size-full is-resized wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"289\" height=\"58\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/theroyalscode.com\/students\/g_bryant\/wp-content\/uploads\/2024\/09\/image-3.png\" alt=\"\" class=\"wp-image-20\" style=\"width:427px;height:auto\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<p>originally, i tried setting the sylladex to its original value (below)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>elif cmd.lower() == \"reset sylladex\":\n     sylladex = &#91;\"Sburb\", \"Burnt Apple Pie\", \"Spare Sunglasses\", \"\", \"\", \"\", \"\", \"Apple\"]<\/code><\/pre>\n\n\n\n<p>but that didn&#8217;t work. i asked for help from my teacher, and he told me about how to properly copy lists using the [:] list index.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>sep 26 2024 for my free friday project, i made a sylladex modus, based on integer division.it&#8217;s very similar to dave&#8217;s hash map modus, adding up numbers based on the letters in the word and dividing them to fit in the sylladex. i created a default sylladex (above), and an input area with couple commands [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,1],"tags":[],"class_list":["post-16","post","type-post","status-publish","format-standard","hentry","category-freefriday","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/theroyalscode.com\/students\/g_bryant\/wp-json\/wp\/v2\/posts\/16","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theroyalscode.com\/students\/g_bryant\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theroyalscode.com\/students\/g_bryant\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/g_bryant\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/g_bryant\/wp-json\/wp\/v2\/comments?post=16"}],"version-history":[{"count":3,"href":"https:\/\/theroyalscode.com\/students\/g_bryant\/wp-json\/wp\/v2\/posts\/16\/revisions"}],"predecessor-version":[{"id":27,"href":"https:\/\/theroyalscode.com\/students\/g_bryant\/wp-json\/wp\/v2\/posts\/16\/revisions\/27"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/g_bryant\/wp-json\/wp\/v2\/media?parent=16"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/g_bryant\/wp-json\/wp\/v2\/categories?post=16"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/g_bryant\/wp-json\/wp\/v2\/tags?post=16"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}