{"id":664,"date":"2015-03-10T15:57:59","date_gmt":"2015-03-10T15:57:59","guid":{"rendered":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/?p=664"},"modified":"2015-03-10T22:17:33","modified_gmt":"2015-03-10T22:17:33","slug":"algorithm-specification-revision","status":"publish","type":"post","link":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/2015\/03\/10\/algorithm-specification-revision\/","title":{"rendered":"Algorithm Specification"},"content":{"rendered":"<ul>\n<li>Input Validation<\/li>\n<\/ul>\n<p><!--more--><\/p>\n<h2><strong>Input validation<\/strong><\/h2>\n<p>checking that what is entered by the user is acceptable e.g. that an age isn\u2019t a negative number.<\/p>\n<p>Generic example<\/p>\n<pre style=\"padding-left: 30px\"><strong>1. Repeat<\/strong>\r\n<strong>2.\u00a0 \u00a0Send \u201cPlease enter data\u201d to display<\/strong>\r\n<strong>3.\u00a0 \u00a0Receive<\/strong> data from keyboard\r\n<strong>4.\u00a0 \u00a0If<\/strong> data is outwith range then\r\n<strong>5.\u00a0 \u00a0 \u00a0 \u00a0Send<\/strong> <strong>\u201cre-enter data\u201d to display<\/strong>\r\n<strong>6. Until<\/strong> data is within range<\/pre>\n<p>Checking that Age is between 0 and 120<\/p>\n<pre style=\"padding-left: 30px\">1. REPEAT\r\n2.    SEND<span style=\"color: #3366ff\"> \"Please enter your age\"<\/span> TO DISPLAY\r\n3.    RECEIVE <span style=\"color: #3366ff\">age<\/span> FROM INTEGER KEYBOARD\r\n4.    IF <span style=\"color: #3366ff\">age&lt;0 OR age&gt;120<\/span> THEN\r\n5.       SEND <span style=\"color: #3366ff\">\"Please input an age between 0 and 120\"<\/span> TO DISPLAY\r\n6. UNTIL <span style=\"color: #3366ff\">age&gt;=0 AND age&lt;=120\r\n\r\n<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Input Validation<\/p>\n","protected":false},"author":32,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17935,17013,17009],"tags":[],"class_list":["post-664","post","type-post","status-publish","format-standard","hentry","category-algorithm-specification","category-national-5","category-software-design-devlopment"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts\/664","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/users\/32"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/comments?post=664"}],"version-history":[{"count":8,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts\/664\/revisions"}],"predecessor-version":[{"id":697,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts\/664\/revisions\/697"}],"wp:attachment":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/media?parent=664"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/categories?post=664"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/tags?post=664"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}