{"id":675009,"date":"2023-01-27T13:06:57","date_gmt":"2023-01-27T13:06:57","guid":{"rendered":"https:\/\/teachcomputerscience.com\/?page_id=675009"},"modified":"2023-09-22T13:23:32","modified_gmt":"2023-09-22T13:23:32","slug":"programming-selection","status":"publish","type":"page","link":"https:\/\/teachcomputerscience.com\/ks3\/programming\/programming-selection\/","title":{"rendered":"Programming: Selection KS3 Resources"},"content":{"rendered":"\n<p>This block is for logged out users. The entire objective of this block is to get the visitors to sign up to the email list and get access to the free samples.<\/p>\n<h2>\n\t\tTeach KS3 Students About Programming Selection, Save Hours of Prep!\n\t<\/h2>\n\t<p>Do you want to <strong>save hours of lesson preparation time?<\/strong> Get your evenings and weekends back and focus your time where it&#8217;s needed! Be fully prepared with presentations, notes, activities, and more.<\/p>\n<p>All Computer Science topics are covered, and each module comes complete with:<\/p>\n<ul>\n<li>Classroom Presentations<\/li>\n<li>Revision Notes<\/li>\n<li>Activities &amp; Quizzes<\/li>\n<li>Mind Maps, Flashcards &amp; Glossaries<\/li>\n<\/ul>\n\t\t\t<a href=\"#cbceba60ab\" target=\"_self\" role=\"button\" rel=\"noopener\">\n\t\t\t\t\t\t\tSubscribe to Download \u2192\n\t\t\t\t\t<\/a>\n\t\t\t\t<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/teachcomputerscience.com\/wp-content\/uploads\/2019\/07\/tcs-logo.png\" alt=\"tcs-logo\" itemprop=\"image\" height=\"270\" width=\"270\" title=\"tcs-logo\" onerror=\"this.style.display='none'\">\n\t<a class=\"link\" href=\"#cb56949b65\">Download free samples<\/a>\n\t<p>This block is for logged in users who have an active and paid membership. The entire objective of this block is to give them quick access to the downloads in this section of the site.<\/p>\n<h2>\n\t\tDownload Your Premium Introduction to Computers Module\n\t<\/h2>\n\t<p>As a Premium Teach Computer Science member, you can download all of the Programming Selection materials below:<\/p>\n<ul>\n<li data-css=\"tve-u-16cae7cc28e\">An editable PowerPoint lesson presentation<\/li>\n<li data-css=\"tve-u-16cae7cc28e\">Editable revision handouts<\/li>\n<li data-css=\"tve-u-16cae7cc28e\">\nA glossary that covers the key terminologies of the module\n<\/li>\n<li data-css=\"tve-u-16cae7cc28e\">\nTopic mindmaps for visualising the key concepts\n<\/li>\n<li data-css=\"tve-u-16cae7cc28e\">\nPrintable flashcards to help students engage in active recall\n<\/li>\n<li data-css=\"tve-u-16cae7cc28e\">\nA quiz with an answer key to test knowledge and understanding of the module\n<\/li>\n<\/ul>\n<h3>\n\t\tCompatible with AQA, OCR, Edexcel, CIE, Eduqas, WJEC, Nat 5\n\t<\/h3>\n\t\t\t\t<img decoding=\"async\" src=\"https:\/\/teachcomputerscience.com\/wp-content\/uploads\/2019\/08\/052-php-code.png\" alt=\"052-php-code.png\" itemprop=\"image\" title=\"052-php-code.png\" onerror=\"this.style.display='none'\">\n\t\t\t<a href=\"Programming Selection&lt;\/h3&gt;\n&lt;p&gt;&lt;strong&gt;This download is exclusively for Teach Computer Science subscribers!&lt;\/strong&gt;&lt;br&gt;To download this file, click the button below to signup (it only takes a minute) and you&#039;ll be brought right back to this page to start the download!&lt;\/p&gt;\n&lt;a class=&quot;button button-action&quot; href=&quot;\/membership\/?redirect=https:\/\/teachcomputerscience.com\/wp-json\/wp\/v2\/pages\/675009&quot;&gt;Sign up now &rarr;&lt;\/a&gt;&lt;br \/&gt;\n&lt;span class=&quot;rcp_login_link&quot;&gt;&lt;a href=&quot;\/login\/?redirect=https:\/\/teachcomputerscience.com\/wp-json\/wp\/v2\/pages\/675009&quot;&gt;Already a member? Log in to download.&lt;\/a&gt;&lt;\/span&gt;\n&lt;\/div&gt;\n&lt;a class=&quot;button member-download&quot; href=&quot;#member-download-17036&quot; data-effect=&quot;mfp-zoom-in&quot;&gt;Download &rarr;&lt;\/a&gt;\" target=\"_self\" role=\"button\" rel=\"noopener\">\n\t\t\t\t\t\t\tDownload Resources\n\t\t\t\t\t<\/a>\n<h2><strong>Programming: Selection<\/strong><\/h2>\n<p>\u200bSelection constructs are an important aspect of programming as they allow the program to make decisions and choose between different paths of execution based on a certain condition. They enable the program to execute only a specific set of statements if a particular condition is met.<\/p>\n<p>In programming languages, the most common type of selection construct is the &#8220;if-else&#8221; statement. The &#8220;if&#8221; statement checks if a certain condition is true, and if it is, the statements within the &#8220;if&#8221; block are executed. If the condition is not true, the program continues to the &#8220;else&#8221; block, where the statements within that block are executed. For example, the following code snippet uses an &#8220;if-else&#8221; statement to check if a number is greater than 5, if it is, it prints &#8220;Number is greater than 5&#8221;, otherwise it prints &#8220;Number is less than or equal to 5&#8221;:<\/p>\n<em>number = 7<\/em><br>\n<em>if number &gt; 5:<\/em><br>\n<em>print(&#8220;Number is greater than 5&#8221;)<\/em><br>\n<em>else:<\/em><br>\n<em>print(&#8220;Number is less than or equal to 5&#8221;)<\/em>\n<p>In addition to the &#8220;if-else&#8221; statement, there are other types of selection constructs, such as the &#8220;switch-case&#8221; statement, which is commonly used in languages such as C, C++, and Java. The &#8220;switch-case&#8221; statement allows the program to check for multiple conditions and choose the path of execution based on the condition that is satisfied.<\/p>\n<p>Selection constructs are also commonly used in conjunction with iteration constructs, such as for and while loops, to control the flow of the program and make decisions based on the current value of a variable.<\/p>\n<p>This \u200bKS3 Computer Science module introduces \u200b\u200b\u200bselection to your students, explaining:<\/p>\n<ul>\n<li>\u200bProgramming construct: Selection in graphical programming<\/li>\n<li>Operators: Boolean, arithmetic &amp; Comparison<\/li>\n<\/ul>\n<h2>\n\t\tResource Examples\n\t<\/h2>\n<h2>\n\t\tLesson Presentations\n\t<\/h2>\n\t\t\t\t<img decoding=\"async\" src=\"https:\/\/teachcomputerscience.com\/wp-content\/uploads\/2023\/01\/KS3-Presentation-19-Programming-Selection.pptx.png\" alt=\"KS3-Presentation-19-Programming-Selection.pptx.png\" itemprop=\"image\" title=\"KS3-Presentation-19-Programming-Selection.pptx.png\" onerror=\"this.style.display='none'\">\n\t\t\t\t<img decoding=\"async\" src=\"https:\/\/teachcomputerscience.com\/wp-content\/uploads\/2023\/01\/KS3-Presentation-19-Programming-Selection.pptx-1.png\" alt=\"KS3-Presentation-19-Programming-Selection.pptx-1.png\" itemprop=\"image\" title=\"KS3-Presentation-19-Programming-Selection.pptx-1.png\" onerror=\"this.style.display='none'\">\n<h2>\n\t\tRevision Notes, Quiz &amp; Activities\n\t<\/h2>\n\t\t\t\t<img decoding=\"async\" src=\"https:\/\/teachcomputerscience.com\/wp-content\/uploads\/2023\/01\/KS3-Revision-Notes-19-Programming-Selection.pptx.png\" alt=\"KS3-Revision-Notes-19-Programming-Selection.pptx.png\" itemprop=\"image\" title=\"KS3-Revision-Notes-19-Programming-Selection.pptx.png\" onerror=\"this.style.display='none'\">\n\t\t\t\t<img decoding=\"async\" src=\"https:\/\/teachcomputerscience.com\/wp-content\/uploads\/2023\/01\/KS3-Quiz-19-Programming-Selection.pptx.png\" alt=\"KS3-Quiz-19-Programming-Selection.pptx.png\" itemprop=\"image\" title=\"KS3-Quiz-19-Programming-Selection.pptx.png\" onerror=\"this.style.display='none'\">\n\t\t\t\t<img decoding=\"async\" src=\"https:\/\/teachcomputerscience.com\/wp-content\/uploads\/2023\/01\/KS3-Revision-Notes-19-Programming-Selection.pptx-1.png\" alt=\"KS3-Revision-Notes-19-Programming-Selection.pptx-1.png\" itemprop=\"image\" title=\"KS3-Revision-Notes-19-Programming-Selection.pptx-1.png\" onerror=\"this.style.display='none'\">\n<h2><strong>More Programming Modules<\/strong><\/h2>\n<p>\u200bProgramming Selection is one lesson in our Computer Programming module. The other theory lessons can be found below:<\/p>\n\t\t\t\t<img decoding=\"async\" src=\"https:\/\/teachcomputerscience.com\/wp-content\/uploads\/2019\/08\/028-desktop-1.png\" alt=\"028-desktop-1.png\" itemprop=\"image\" title=\"028-desktop-1.png\" onerror=\"this.style.display='none'\">\n\t\t\t<a href=\"http:\/\/teachcomputerscience.com\/ks3\/programming\/programming-languages\/\" target=\"_self\" role=\"button\" rel=\"noopener\">\n\t\t\t\t\t\t\tProgramming Languages \u2192\n\t\t\t\t\t<\/a>\n\t\t\t\t<img decoding=\"async\" src=\"https:\/\/teachcomputerscience.com\/wp-content\/uploads\/2019\/08\/028-desktop-1.png\" alt=\"028-desktop-1.png\" itemprop=\"image\" title=\"028-desktop-1.png\" onerror=\"this.style.display='none'\">\n\t\t\t<a href=\"http:\/\/teachcomputerscience.com\/ks3\/programming\/data-types\/\" target=\"_self\" role=\"button\" rel=\"noopener\">\n\t\t\t\t\t\t\tData Types \u2192\n\t\t\t\t\t<\/a>\n\t\t\t\t<img decoding=\"async\" src=\"https:\/\/teachcomputerscience.com\/wp-content\/uploads\/2019\/08\/028-desktop-1.png\" alt=\"028-desktop-1.png\" itemprop=\"image\" title=\"028-desktop-1.png\" onerror=\"this.style.display='none'\">\n\t\t\t<a href=\"http:\/\/teachcomputerscience.com\/ks3\/programming\/programming-constructs\/\" target=\"_self\" role=\"button\" rel=\"noopener\">\n\t\t\t\t\t\t\tProgramming Constructs \u2192\n\t\t\t\t\t<\/a>\n\t\t\t\t<img decoding=\"async\" src=\"https:\/\/teachcomputerscience.com\/wp-content\/uploads\/2019\/08\/028-desktop-1.png\" alt=\"028-desktop-1.png\" itemprop=\"image\" title=\"028-desktop-1.png\" onerror=\"this.style.display='none'\">\n\t\t\t<a href=\"http:\/\/teachcomputerscience.com\/ks3\/programming\/programming-iteration\/\" target=\"_self\" role=\"button\" rel=\"noopener\">\n\t\t\t\t\t\t\tProgramming Iteration \u2192\n\t\t\t\t\t<\/a>\n\t\t\t\t<img decoding=\"async\" src=\"https:\/\/teachcomputerscience.com\/wp-content\/uploads\/2019\/08\/028-desktop-1.png\" alt=\"028-desktop-1.png\" itemprop=\"image\" title=\"028-desktop-1.png\" onerror=\"this.style.display='none'\">\n\t\t\t<a href=\"http:\/\/teachcomputerscience.com\/ks3\/programming\/data-structures\/\" target=\"_self\" role=\"button\" rel=\"noopener\">\n\t\t\t\t\t\t\tData Structures \u2192\n\t\t\t\t\t<\/a>\n\t\t\t\t<img decoding=\"async\" src=\"https:\/\/teachcomputerscience.com\/wp-content\/uploads\/2019\/08\/028-desktop-1.png\" alt=\"028-desktop-1.png\" itemprop=\"image\" title=\"028-desktop-1.png\" onerror=\"this.style.display='none'\">\n\t\t\t<a href=\"http:\/\/teachcomputerscience.com\/ks3\/programming\/modular-programming\/\" target=\"_self\" role=\"button\" rel=\"noopener\">\n\t\t\t\t\t\t\tModular Programming \u2192\n\t\t\t\t\t<\/a>\n\t\t\t\t<img decoding=\"async\" src=\"https:\/\/teachcomputerscience.com\/wp-content\/uploads\/2019\/08\/028-desktop-1.png\" alt=\"028-desktop-1.png\" itemprop=\"image\" title=\"028-desktop-1.png\" onerror=\"this.style.display='none'\">\n\t\t\t<a href=\"http:\/\/teachcomputerscience.com\/ks3\/programming\/testing-and-validation\/\" target=\"_self\" role=\"button\" rel=\"noopener\">\n\t\t\t\t\t\t\tTesting and Validation \u2192\n\t\t\t\t\t<\/a>\n\t\t\t\t<img decoding=\"async\" src=\"https:\/\/teachcomputerscience.com\/wp-content\/uploads\/2019\/08\/028-desktop-1.png\" alt=\"028-desktop-1.png\" itemprop=\"image\" title=\"028-desktop-1.png\" onerror=\"this.style.display='none'\">\n\t\t\t<a href=\"https:\/\/teachcomputerscience.com\/ks3\/\" target=\"_self\" role=\"button\" rel=\"noopener\">\n\t\t\t\t\t\t\tSee More KS3 Modules \u2192\n\t\t\t\t\t<\/a>\n<h3>\n\t\tFrequently Asked Questions About KS3 Programming Selection\n\t<\/h3>\n<h4>\n\t\tWhat is a selection construct?\n\t<\/h4>\n\t<p>A selection construct is a programming construct that allows the program to make a decision and execute different code based on the outcome of that decision. An example of a selection construct is an if-else statement.<\/p>\n<h4>\n\t\tWhat is an if-else statement?\n\t<\/h4>\n\t<p>An if-else statement is a selection construct that tests a condition, and if the condition is true, a block of code is executed, otherwise, an alternate block of code is executed. The syntax for an if-else statement is:<\/p>\n<em>if (condition) {<\/em><br>\n<em>\/\/ code to be executed if condition is true<\/em><br>\n<em>} else {<\/em><br>\n<em>\/\/ code to be executed if condition is false<\/em><br>\n<em>}<\/em>\n<h4>\n\t\tWhat is a ternary operator?\n\t<\/h4>\n\t<p>A ternary operator is a shorthand way of writing an if-else statement that assigns a value to a variable based on the outcome of a condition. The syntax for a ternary operator is:<\/p>\n\n<h4>\n\t\tWhat is a switch statement?\n\t<\/h4>\n\t<p>A switch statement is a selection construct that allows a program to test a variable against multiple cases and execute different code for each case. The syntax for a switch statement is:<\/p>\n<em>switch (variable) {<\/em><br>\n<em>case value1:<\/em><br>\n<em>\/\/ code to be executed if variable equals value1<\/em><br>\n<em>break;<\/em><br>\n<em>case value2:<\/em><br>\n<em>\/\/ code to be executed if variable equals value2<\/em><br>\n<em>break;<\/em><br>\n<em>default:<\/em><br>\n<em>\/\/ code to be executed if variable does not match any of the cases<\/em><br>\n<em>}<\/em>\n<h4>\n\t\tWhat is a guard clause?\n\t<\/h4>\n\t<p>A guard clause is a programming construct that is used to check for a specific condition at the beginning of a function or block of code, and exits the function or block if the condition is not met, this is also known as an early return. The purpose of a guard clause is to make the code more readable and to prevent the need for nested if-else statements.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This block is for logged out users. The entire objective of this block is to get the visitors to sign up to the email list and get access to the free samples. Teach KS3 Students About Programming Selection, Save Hours of Prep! Do you want to save hours of lesson preparation time? Get your evenings &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Programming: Selection KS3 Resources\" class=\"read-more button\" href=\"https:\/\/teachcomputerscience.com\/ks3\/programming\/programming-selection\/\" aria-label=\"More on Programming: Selection KS3 Resources\">Read more<\/a><\/p>\n","protected":false},"author":77206,"featured_media":0,"parent":16955,"menu_order":3,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_generate-full-width-content":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"tags":[55,54,75],"class_list":{"0":"post-675009","1":"page","2":"type-page","3":"status-publish","5":"tag-ages-11-14","6":"tag-ks3","7":"tag-programming-selection"},"acf":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/teachcomputerscience.com\/wp-json\/wp\/v2\/pages\/675009","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/teachcomputerscience.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/teachcomputerscience.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/teachcomputerscience.com\/wp-json\/wp\/v2\/users\/77206"}],"replies":[{"embeddable":true,"href":"https:\/\/teachcomputerscience.com\/wp-json\/wp\/v2\/comments?post=675009"}],"version-history":[{"count":5,"href":"https:\/\/teachcomputerscience.com\/wp-json\/wp\/v2\/pages\/675009\/revisions"}],"predecessor-version":[{"id":675332,"href":"https:\/\/teachcomputerscience.com\/wp-json\/wp\/v2\/pages\/675009\/revisions\/675332"}],"up":[{"embeddable":true,"href":"https:\/\/teachcomputerscience.com\/wp-json\/wp\/v2\/pages\/16955"}],"wp:attachment":[{"href":"https:\/\/teachcomputerscience.com\/wp-json\/wp\/v2\/media?parent=675009"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/teachcomputerscience.com\/wp-json\/wp\/v2\/tags?post=675009"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}