{"id":2343,"date":"2021-08-21T18:51:17","date_gmt":"2021-08-21T18:51:17","guid":{"rendered":"https:\/\/computerscienced.co.uk\/site\/?page_id=2343"},"modified":"2021-08-21T18:51:18","modified_gmt":"2021-08-21T18:51:18","slug":"ks4-ocr-2-3-producing-robust-programs-guess-the-keyword","status":"publish","type":"page","link":"https:\/\/computerscienced.co.uk\/site\/ks4-ocr-2-3-producing-robust-programs-guess-the-keyword\/","title":{"rendered":"KS4 OCR 2.3 Producing Robust Programs &#8211; Guess the Keyword"},"content":{"rendered":"\n<p>Your randomised keyword starter task is generated below the separator.  To produce the answers slide simply click on the &#8216;Export to PPTX button&#8217;.  This will save it as a Microsoft PowerPoint document.  To produce a slide without the answers on click on the &#8216;Hide\/Reveal keywords&#8217; button then click on the &#8216;Export to PPTX button&#8217;.  <\/p>\n\n\n\n<p><strong>Please note<\/strong> &#8211; As this is randomised you may occasionally get keywords appearing twice.  Simply click on the &#8216;Randomise the keywords&#8217; button and it will have another go at randomising the keywords.   <\/p>\n\n\n\n<p><strong>Please also keep in mind<\/strong> that the method used to export to PowerPoint is fairly basic so you may need to style the outputted PowerPoint slides yourself.      <\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<style>\ntable, td, th {\n    border: 0px solid rgba(0,0,0,0);\n    padding:0px;\n}\nbody, button, input, select, textarea {\nfont-family:Calibri;\n}\n<\/style>\n<script src=\"https:\/\/cdn.jsdelivr.net\/npm\/pptxgenjs@3.7.0\/dist\/pptxgen.bundle.js\"><\/script>\n<table id=\"tableId\" style=\"width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 100%;\" colspan=\"2\">\n    <p style=\"font-family:Calibri; font-size:30px\"><b><strong>Instructions: <\/strong><\/b>Read through the definitions below and figure out what the key word is.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 100%;\" colspan=\"2\">\n<p style=\"font-family:Calibri; font-size:30px\"><strong>Challenge: <\/strong>Explain how the word is relevant to what we have studied<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 100%;\" colspan=\"2\">\n<p style=\"font-family:Calibri; font-size:30px\"><\/p>\n<\/td>\n<\/tr>\n<tr style=\"border:solid 1px;\">\n<td style=\"width: 25%; border:solid 1px; border-color: #000;\">\n<p style=\"font-family:Calibri; font-size:30px\"><strong>Keyword<\/strong><\/p>\n<\/td>\n<td style=\"width: 75%; border:solid 1px; border-color: #000;\">\n<p style=\"font-family:Calibri; font-size:30px\"><strong>Definition<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td id=\"myText1\" style=\"width: 25%; border:solid 1px; border-color: #000;text-transform:capitalize;\">\n<p>&nbsp;<\/p>\n<\/td>\n<td id=\"myTextHINT1\" style=\"width: 75%; border:solid 1px; border-color: #000;font-family:Calibri; font-size:14px;\">\n<p style=\"font-family:Calibri; font-size:30px\">&nbsp;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td id=\"myText2\" style=\"width: 25%; border:solid 1px; border-color: #000;text-transform:capitalize;\">\n<p>&nbsp;<\/p>\n<\/td>\n<td id=\"myTextHINT2\" style=\"width: 75%; border:solid 1px; border-color: #000;font-family:Calibri; font-size:14px;\">\n<p style=\"font-family:Calibri; font-size:30px\">&nbsp;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td id=\"myText3\" style=\"width: 25%; border:solid 1px; border-color: #000;text-transform:capitalize;\">\n<p>&nbsp;<\/p>\n<\/td>\n<td id=\"myTextHINT3\" style=\"width: 75%; border:solid 1px; border-color: #000;font-family:Calibri; font-size:14px;\">\n<p style=\"font-family:Calibri; font-size:30px\">&nbsp;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td id=\"myText4\" style=\"width: 25%; border:solid 1px; border-color: #000;text-transform:capitalize;\">\n<p>&nbsp;<\/p>\n<\/td>\n<td id=\"myTextHINT4\" style=\"width: 75%; border:solid 1px; border-color: #000;font-family:Calibri; font-size:14px;\">\n<p style=\"font-family:Calibri; font-size:30px\">&nbsp;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td id=\"myText5\" style=\"width: 25%; border:solid 1px; border-color: #000;text-transform:capitalize;\">\n<p>&nbsp;<\/p>\n<\/td>\n<td id=\"myTextHINT5\" style=\"width: 75%; border:solid 1px; border-color: #000;font-family:Calibri; font-size:14px;\">\n<p style=\"font-family:Calibri; font-size:30px\"><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<button onclick=\"location.reload();\">Randomise the keywords<\/button>\n<button onclick=\"{ var pptx=new PptxGenJS(); pptx.tableToSlides('tableId'); pptx.writeFile(); }\" type=\"button\">\n  Export to PPTX\n<\/button>\n<button onclick=\"change()\">Hide \/ Reveal Keywords<\/button>\n<script>\n\n\nvar KEYWORDS     = [\"array\", \"boolean operator\", \"bug\", \"data sanitation\",\"extreme data\",\"input sanitation\",\"invalid data\",\"logic error\",\"maintainability\",\"masking\",\"test plan\",\"trace table\",\"valid data\",\"validation\"];\nvar HINTS     = [\"A set of data values of the same type, stored in a sequence in a computer program.\",\"AND, OR and NOT. Used to build complex queries in a database\",\"An error in a program\",\"The process of hiding or protecting data so it cannot be seen or disclosed.\",\"Valid data that falls at the boundary of any possible ranges\",\"The process of checking entered data for security issues\",\"Data that a program cannot process and should not accept.\",\"Error in a program that can cause unexpected results.\",\"Ensuring that a program is easy to understand, modify and update.\",\"Hiding visible data.\",\"A list of what is to be tested and how it is to be tested.\",\"Used when testing a program to record changes in variable values as code executes.\",\"Sensible, possible data that a program should accept and be able to process.\",\"Checking input data is sensible and in the right format.\"]\n\n\nvar rannum1 = Math.floor(Math.random() * KEYWORDS.length);\nx = KEYWORDS[rannum1];\nxy = HINTS[rannum1]; \ndocument.getElementById(\"myText1\").innerHTML = x;\ndocument.getElementById(\"myTextHINT1\").innerHTML = xy;\n\nvar rannum2 = Math.floor(Math.random() * KEYWORDS.length);\ny = KEYWORDS[rannum2];\nyy = HINTS[rannum2]; \ndocument.getElementById(\"myText2\").innerHTML = y;\ndocument.getElementById(\"myTextHINT2\").innerHTML = yy;\n\nvar rannum3 = Math.floor(Math.random() * KEYWORDS.length);\nz = KEYWORDS[rannum3];\nzy = HINTS[rannum3]; \ndocument.getElementById(\"myText3\").innerHTML = z;\ndocument.getElementById(\"myTextHINT3\").innerHTML = zy;\n\nvar rannum4 = Math.floor(Math.random() * KEYWORDS.length);\na = KEYWORDS[rannum4];\nay = HINTS[rannum4]; \ndocument.getElementById(\"myText4\").innerHTML = a;\ndocument.getElementById(\"myTextHINT4\").innerHTML = ay;\n\nvar rannum5 = Math.floor(Math.random() * KEYWORDS.length);\nb = KEYWORDS[rannum5];\nby = HINTS[rannum5]; \ndocument.getElementById(\"myText5\").innerHTML = b;\ndocument.getElementById(\"myTextHINT5\").innerHTML = by;\n\nfunction change() {\n   var t = document.getElementById(\"myText1\").innerHTML;\nvar m = document.getElementById(\"myText2\").innerHTML;\nvar n = document.getElementById(\"myText3\").innerHTML;\nvar o = document.getElementById(\"myText4\").innerHTML;\nvar p = document.getElementById(\"myText5\").innerHTML;\n\nif (t === x) {\ndocument.getElementById(\"myText1\").innerHTML = \"\";\n}else{\ndocument.getElementById(\"myText1\").innerHTML = x;\n   } \n\n\nif (m === y) {\ndocument.getElementById(\"myText2\").innerHTML = \"\";\n}else{\ndocument.getElementById(\"myText2\").innerHTML = y;\n   } \n\n\nif (n === z) {\ndocument.getElementById(\"myText3\").innerHTML = \"\";\n}else{\ndocument.getElementById(\"myText3\").innerHTML = z;\n   } \n\n\nif (o === a) {\ndocument.getElementById(\"myText4\").innerHTML = \"\";\n}else{\ndocument.getElementById(\"myText4\").innerHTML = a;\n   } \n\n\nif (p === b) {\ndocument.getElementById(\"myText5\").innerHTML = \"\";\n}else{\ndocument.getElementById(\"myText5\").innerHTML = b;\n   } \n}\n<\/script>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Your randomised keyword starter task is generated below the separator. To produce the answers slide simply click on the &#8216;Export&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"disable_featured_image":false,"footnotes":""},"class_list":["post-2343","page","type-page","status-publish","hentry"],"blog_post_layout_featured_media_urls":{"thumbnail":"","full":""},"categories_names":null,"comments_number":"0","_links":{"self":[{"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/pages\/2343","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/comments?post=2343"}],"version-history":[{"count":1,"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/pages\/2343\/revisions"}],"predecessor-version":[{"id":2345,"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/pages\/2343\/revisions\/2345"}],"wp:attachment":[{"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/media?parent=2343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}