{"id":258,"date":"2020-11-05T08:54:09","date_gmt":"2020-11-05T08:54:09","guid":{"rendered":"https:\/\/blogs.glowscotland.org.uk\/nl\/bantonbuzz\/?p=258"},"modified":"2024-09-24T11:07:27","modified_gmt":"2024-09-24T11:07:27","slug":"dice-emulator","status":"publish","type":"post","link":"https:\/\/blogs.glowscotland.org.uk\/nl\/bantonbuzz\/dice-emulator\/","title":{"rendered":"Dice Emulator"},"content":{"rendered":"\n<p><strong>Press the Arrow: \u25b6\ufe0e then give it a shake<\/strong><\/p>\n\n\n<div style='position:relative;height:0;padding-bottom:70%;overflow:hidden;'><iframe style='position: absolute; top: 0; left: 0; width: 100%; height: 100%;'  src='https:\/\/makecode.microbit.org\/#pub:_4f56bk7RY39R' frameBorder='0' sandbox='allow-popups allow-forms allow-scripts allow-same-origin' ><\/iframe><\/div>\n\n\n\n<div class=\"wp-block-group has-background has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\" style=\"background-color:#ffff00\">\n<p style=\"padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\"><strong>Can you tell what is wrong with the emulator above? You might need to try a few times before you see the problem.<\/strong><\/p>\n<\/div>\n\n\n\n<p>Things you might need:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"764\" height=\"366\" data-attachment-id=\"753\" data-permalink=\"https:\/\/blogs.glowscotland.org.uk\/nl\/bantonbuzz\/dice-emulator\/microbit-shake-show-number-prandom\/\" data-orig-file=\"https:\/\/blogs.glowscotland.org.uk\/nl\/public\/bantonbuzz\/uploads\/sites\/35004\/2020\/11\/13184044\/microbit-shake-show-number-prandom.png\" data-orig-size=\"764,366\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"microbit-shake-show-number-prandom\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/blogs.glowscotland.org.uk\/nl\/public\/bantonbuzz\/uploads\/sites\/35004\/2020\/11\/13184044\/microbit-shake-show-number-prandom-300x144.png\" data-large-file=\"https:\/\/blogs.glowscotland.org.uk\/nl\/public\/bantonbuzz\/uploads\/sites\/35004\/2020\/11\/13184044\/microbit-shake-show-number-prandom.png\" src=\"https:\/\/blogs.glowscotland.org.uk\/nl\/public\/bantonbuzz\/uploads\/sites\/35004\/2020\/11\/13184044\/microbit-shake-show-number-prandom.png\" alt=\"makecode blocks\" class=\"wp-image-753\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/nl\/public\/bantonbuzz\/uploads\/sites\/35004\/2020\/11\/13184044\/microbit-shake-show-number-prandom.png 764w, https:\/\/blogs.glowscotland.org.uk\/nl\/public\/bantonbuzz\/uploads\/sites\/35004\/2020\/11\/13184044\/microbit-shake-show-number-prandom-300x144.png 300w\" sizes=\"auto, (max-width: 764px) 100vw, 764px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Challenge<\/h3>\n\n\n\n<p>That is quite simple, can you make a randomiser that shows dice faces?<\/p>\n\n\n\n<p>You would need an <strong>if-else<\/strong> block, a&nbsp;<strong>variable<\/strong>&nbsp;and a <strong>comparison<\/strong> block!<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"678\" height=\"532\" data-attachment-id=\"756\" data-permalink=\"https:\/\/blogs.glowscotland.org.uk\/nl\/bantonbuzz\/dice-emulator\/microbit-5-dice\/\" data-orig-file=\"https:\/\/blogs.glowscotland.org.uk\/nl\/public\/bantonbuzz\/uploads\/sites\/35004\/2020\/11\/13184604\/microbit-5-dice.png\" data-orig-size=\"678,532\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"microbit-5-dice\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/blogs.glowscotland.org.uk\/nl\/public\/bantonbuzz\/uploads\/sites\/35004\/2020\/11\/13184604\/microbit-5-dice-300x235.png\" data-large-file=\"https:\/\/blogs.glowscotland.org.uk\/nl\/public\/bantonbuzz\/uploads\/sites\/35004\/2020\/11\/13184604\/microbit-5-dice.png\" src=\"https:\/\/blogs.glowscotland.org.uk\/nl\/public\/bantonbuzz\/uploads\/sites\/35004\/2020\/11\/13184604\/microbit-5-dice.png\" alt=\"microbit dice\" class=\"wp-image-756\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/nl\/public\/bantonbuzz\/uploads\/sites\/35004\/2020\/11\/13184604\/microbit-5-dice.png 678w, https:\/\/blogs.glowscotland.org.uk\/nl\/public\/bantonbuzz\/uploads\/sites\/35004\/2020\/11\/13184604\/microbit-5-dice-300x235.png 300w\" sizes=\"auto, (max-width: 678px) 100vw, 678px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Press the Arrow: \u25b6\ufe0e then give it a shake Can you tell what is wrong with the emulator above? You might need to try a few times before you see the problem. Things you might need: Challenge That is quite simple, can you make a randomiser that shows dice faces? You would need an if-else [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":755,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[16],"tags":[],"class_list":["post-258","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microbit"],"jetpack_featured_media_url":"https:\/\/blogs.glowscotland.org.uk\/nl\/public\/bantonbuzz\/uploads\/sites\/35004\/2020\/11\/13184222\/microbit-2.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/bantonbuzz\/wp-json\/wp\/v2\/posts\/258","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/bantonbuzz\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/bantonbuzz\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/bantonbuzz\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/bantonbuzz\/wp-json\/wp\/v2\/comments?post=258"}],"version-history":[{"count":8,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/bantonbuzz\/wp-json\/wp\/v2\/posts\/258\/revisions"}],"predecessor-version":[{"id":1869,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/bantonbuzz\/wp-json\/wp\/v2\/posts\/258\/revisions\/1869"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/bantonbuzz\/wp-json\/wp\/v2\/media\/755"}],"wp:attachment":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/bantonbuzz\/wp-json\/wp\/v2\/media?parent=258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/bantonbuzz\/wp-json\/wp\/v2\/categories?post=258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/bantonbuzz\/wp-json\/wp\/v2\/tags?post=258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}