{"id":2117,"date":"2023-03-05T09:50:39","date_gmt":"2023-03-05T09:50:39","guid":{"rendered":"http:\/\/147.182.205.39\/lesson\/lesson-7-conditional-statements-logical-operators\/"},"modified":"2023-03-23T09:08:37","modified_gmt":"2023-03-23T09:08:37","slug":"lesson-7-conditional-statements-logical-operators","status":"publish","type":"lesson","link":"https:\/\/stemlab.org.in\/hi\/lesson\/lesson-7-conditional-statements-logical-operators\/","title":{"rendered":"Lesson 7: Conditional Statements &#038;  Logical Operators"},"content":{"rendered":"<h2>Conditional Statement<\/h2>\n<p><del>Conditional statements<\/del> allow the program to check the conditions by testing a variable against a value and acting accordingly. A program that has conditional statements is called a Conditional Program, and the process is known as Conditional Programming.<\/p>\n<h3>Relational Operators<\/h3>\n<p>A <del>relational operator<\/del> is an operator that tests a relation between two entities. The result of a relational operator is either true or false.<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"56\"><strong><em>S No<\/em><\/strong><\/td>\n<td width=\"113\"><strong><em>Operator<\/em><\/strong><\/td>\n<td width=\"348\"><strong><em>Definition<\/em><\/strong><\/td>\n<td width=\"179\"><strong><em>Image<\/em><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"56\"><strong>1<\/strong><\/td>\n<td width=\"113\">Greater Than<\/td>\n<td width=\"348\">This block reports true only if the first number is greater than the second number. If the first number is equal to or less than the second, it results in a false.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>15 &gt; 10 will return true.<\/p>\n<p>10 &gt; 15 will return false.<\/td>\n<td width=\"179\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1317\" src=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/image102.png\" alt=\"\" width=\"177\" height=\"66\" \/><\/td>\n<\/tr>\n<tr>\n<td width=\"56\"><strong>2<\/strong><\/td>\n<td width=\"113\">Less Than<\/td>\n<td width=\"348\">This block reports true only if the first number is less than the second number. If the first number is equal to or greater than the second, it results in a false.<\/p>\n<p><strong>Example<\/strong>:<\/p>\n<p>15 &gt; 10 will return false.<\/p>\n<p>10 &gt; 15 will return true.<\/td>\n<td width=\"179\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1319\" src=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/image103.png\" alt=\"\" width=\"176\" height=\"72\" \/><\/td>\n<\/tr>\n<tr>\n<td width=\"56\"><strong>3<\/strong><\/td>\n<td width=\"113\">Equals to<\/td>\n<td width=\"348\">It results in true only if the first number equals the second number; otherwise, it results in false.<\/td>\n<td width=\"179\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1321\" src=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/image104.png\" alt=\"\" width=\"178\" height=\"75\" \/><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Activity 1: Gliding using if () then Block<\/h2>\n<p>Make a script that will make Tobi glide to a random position on the Stage whenever we press the space key.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2044\" src=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/Moving-tobi-to-random-position.gif\" alt=\"\" width=\"414\" height=\"335\" \/><\/p>\n<h3>Flowchart<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1465 aligncenter\" src=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/image105.png\" alt=\"\" width=\"226\" height=\"299\" \/><\/p>\n<h3>Coding Steps<\/h3>\n<p>Follow the steps below:<\/p>\n<ol>\n<li>Open <del>PictoBlox App<\/del>, go to <del>My Space<\/del>, and click on the <del>+<\/del> button to <strong>create a new file<\/strong>.<\/li>\n<li>Add the\u00a0<strong>when flag clicked <\/strong>block<strong>.<\/strong><\/li>\n<li>Add <strong>forever<\/strong> block below the <strong>when flag clicked <\/strong>block<strong>.<\/strong><\/li>\n<li>Add an <strong>if () then <\/strong>block inside the <strong>forever<\/strong> block<strong>.<\/strong><\/li>\n<li>Place a <strong>key () pressed?<\/strong> block from the <del>Sensing<\/del> palette in the space of the <strong>if <\/strong>block<strong>.<\/strong><\/li>\n<li>Place\u00a0<strong>glide to () second<\/strong> block\u00a0under the if arm.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1475 size-full\" src=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/image106.png\" alt=\"\" width=\"343\" height=\"276\" srcset=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/image106.png 343w, https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/image106-300x241.png 300w\" sizes=\"(max-width: 343px) 100vw, 343px\" \/><\/li>\n<li>Click the <strong>green flag<\/strong> and press the space key to move Tobi around.<\/li>\n<\/ol>\n<h3>Activity 1: Output<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2044\" src=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/Moving-tobi-to-random-position.gif\" alt=\"\" width=\"414\" height=\"335\" \/><\/p>\n<h2>Activity 2: Gliding Using if () then Else Block<\/h2>\n<p>Make a script that will make Tobi move toward the mouse cursor whenever we click it. When we\u2019re not clicking it, he should go back to his default position in the center.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2046\" src=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/Gliding-Tobi-towards-mouse-direction.gif\" alt=\"\" width=\"416\" height=\"338\" \/><\/p>\n<h3>Flowchart<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1479 size-full\" src=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/image107.png\" alt=\"\" width=\"500\" height=\"335\" srcset=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/image107.png 500w, https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/image107-300x201.png 300w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/p>\n<h3>Coding Steps<\/h3>\n<p>Follow the steps below:<\/p>\n<ol>\n<li>Open <del>PictoBlox App<\/del>, go to <del>My Space<\/del>, and click on the <del>+<\/del> button to <strong>create a new file<\/strong>.<\/li>\n<li>Add the\u00a0<strong>when flag clicked <\/strong>block<strong>.<\/strong><\/li>\n<li>Add <strong>forever<\/strong> block below the <strong>when flag clicked <\/strong>block<strong>.<\/strong><\/li>\n<li>Add an <strong>if-else<\/strong> block and place a <strong>mouse down?<\/strong> block from the <del>Sensing<\/del> palette in the space of the <strong>if <\/strong>block<strong>.<\/strong><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1511 aligncenter\" src=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/1-2.png\" alt=\"\" width=\"245\" height=\"293\" \/><\/li>\n<li>If it is true, Tobi should glide toward the mouse. Therefore, add a <strong>glide () secs to x: () y: ()<\/strong>block and place\u00a0<strong>mouse x<\/strong>\u00a0and\u00a0<strong>mouse y<\/strong> from the Sensing palette in their respective white spaces. Set time as 0.5 secs.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1513 size-full\" src=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/2-2.png\" alt=\"\" width=\"371\" height=\"67\" srcset=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/2-2.png 371w, https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/2-2-300x54.png 300w\" sizes=\"(max-width: 371px) 100vw, 371px\" \/><\/li>\n<li>If the condition is false, it will stay at the center. Thus, place another <strong>glide () secs to x: () y: ()<\/strong>block and write set x and y value to 0. Set time as 0.5 secs.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1515 size-full\" src=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/3-2.png\" alt=\"\" width=\"396\" height=\"328\" srcset=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/3-2.png 396w, https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/3-2-300x248.png 300w\" sizes=\"(max-width: 396px) 100vw, 396px\" \/><\/li>\n<li>Click the <strong>green flag <\/strong>and click on the stage to move Tobi around.<\/li>\n<li>Save the file with the name <del>Conditional Programming<\/del>.<\/li>\n<\/ol>\n<h3>Activity 2: Output<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2046\" src=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/Gliding-Tobi-towards-mouse-direction.gif\" alt=\"\" width=\"416\" height=\"338\" \/><\/p>\n<h2>Logical Operator<\/h2>\n<p>A logical operator is an operator that is used to perform a logical operation on one or more Boolean (True\/False) values. Common logical operators include AND, OR, and NOT.<\/p>\n<h3>AND Operator<\/h3>\n<p>AND operator is used to determine if two or more conditions are true. If all the conditions are true, the AND operator returns TRUE. If any one of the conditions fail, the AND operator returns FALSE.<\/p>\n<p><strong><em>In some programming languages AND operator is denoted by the \u201c&amp;&amp;\u201d symbol.<\/em><\/strong><\/p>\n<p><del>Real Life Example<\/del><strong>: <\/strong>You should go to bed only after you have completed your homework and the time is past 8 PM. Here, if we want to derive the logical operation from this scenario, we have the following conditions:<\/p>\n<ul>\n<li><strong>Condition 1<\/strong>: Have you completed homework?<\/li>\n<li><strong>Condition 2<\/strong>: Is the time past 8 PM?<\/li>\n<li><strong>Decision<\/strong>: Should you go to bed?<\/li>\n<\/ul>\n<table width=\"100%\">\n<tbody>\n<tr>\n<td width=\"36%\"><strong><em>Have you completed homework?<\/em><\/strong><\/td>\n<td width=\"29%\"><strong><em>Is the time past 8 PM?<\/em><\/strong><\/td>\n<td width=\"33%\"><strong><em>Should you go to bed?<\/em><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"36%\">YES<\/td>\n<td width=\"29%\">YES<\/td>\n<td width=\"33%\">YES<\/td>\n<\/tr>\n<tr>\n<td width=\"36%\">NO<\/td>\n<td width=\"29%\">YES<\/td>\n<td width=\"33%\">NO<\/td>\n<\/tr>\n<tr>\n<td width=\"36%\">YES<\/td>\n<td width=\"29%\">NO<\/td>\n<td width=\"33%\">NO<\/td>\n<\/tr>\n<tr>\n<td width=\"36%\">NO<\/td>\n<td width=\"29%\">NO<\/td>\n<td width=\"33%\">NO<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The <strong>() and ()<\/strong> block is an <del>Operators<\/del> Block and a <strong>Boolean<\/strong> Block.<img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1527 aligncenter\" src=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/4-2.png\" alt=\"\" width=\"114\" height=\"32\" \/><\/p>\n<p>The block joins two Boolean blocks so they both have to be true to return true. If they are both true, the block returns true; if only one is true or none are true, it returns false.<\/p>\n<h2>Activity 3: AND with Quarky<\/h2>\n<p>We are making a code that basically detects whether both the buttons of Quarky are pressed or not. <strong><em>If both buttons are pressed then the display of Quarky will show green, otherwise red.<\/em><\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2048\" src=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/AND.gif\" alt=\"\" width=\"600\" height=\"338\" \/><\/p>\n<h3>Coding Steps<\/h3>\n<p>Follow the steps below:<\/p>\n<ol>\n<li>Create a New file in <del>PictoBlox App<\/del>.<\/li>\n<li>Connect <del>Quarky<\/del> to <del>PictoBlox<\/del>.<\/li>\n<li>Go to the <del>Sensors<\/del> palette and add a\u00a0<strong>is button () pressed ?<\/strong>\u00a0block into the scripting area. The button,\u00a0<strong>L<\/strong>, is set as the default option.<\/li>\n<li>Go to the <del>Sensors<\/del> palette and add a <strong>is button () pressed ?<\/strong>\u00a0block into the scripting area. Change the button to,\u00a0<strong>R<\/strong>.<\/li>\n<li>Add <strong>() and ()<\/strong> block, from the <del>Operators<\/del> palette. Inside this block add both the <strong>is button () pressed ? <\/strong>blocks.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1531 size-full\" src=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/5-2.png\" alt=\"\" width=\"541\" height=\"61\" srcset=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/5-2.png 541w, https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/5-2-300x34.png 300w\" sizes=\"(max-width: 541px) 100vw, 541px\" \/><\/li>\n<li>Go to the <del>Control<\/del> palette and drop an\u00a0<strong><em>if<\/em><\/strong><em>\u00a0<\/em><strong><em>else\u00a0<\/em><\/strong>block into the scripting area. Drop the\u00a0<strong>()<\/strong>\u00a0<strong>and ()\u00a0<\/strong>block in the white space of the\u00a0<strong><em>if else<\/em><\/strong> block<em>.<\/em><\/li>\n<li>Go to the <del>Display<\/del> palette and drop the\u00a0<strong><em>display matrix as ()<\/em><\/strong>\u00a0block inside the\u00a0<strong>if<\/strong>\u00a0branch and make all LEDs\u00a0<strong>green<\/strong>. Repeat to add\u00a0<strong><em>display matrix as ()<\/em><\/strong>\u00a0block inside the\u00a0<strong>else<\/strong>\u00a0branch and make all LEDs\u00a0<strong>red<\/strong>.<\/li>\n<li>Add a\u00a0<strong>forever <\/strong>block around the entire script.<\/li>\n<li>To add the finishing touch, add a\u00a0<strong>when flag clicked <\/strong>block above the <strong>forever <\/strong>block<strong>.<\/strong><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1533 size-full\" src=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/6-1.png\" alt=\"\" width=\"645\" height=\"348\" srcset=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/6-1.png 645w, https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/6-1-300x162.png 300w, https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/6-1-624x337.png 624w\" sizes=\"(max-width: 645px) 100vw, 645px\" \/><\/li>\n<li>Finally, click the <strong>green flag<\/strong> to run the script. Now test the AND logic with Quarky switches.<\/li>\n<li>Save the file as <del>AND Logic<\/del>.<\/li>\n<\/ol>\n<h3>Activity 3: Output<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2048\" src=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/AND.gif\" alt=\"\" width=\"600\" height=\"338\" \/><\/p>\n<h2>Logical Operator &#8211; OR Operator<\/h2>\n<p>The OR operator is used to determine if either one of two or more conditions is TRUE. If any of the conditions is true, the OR operator returns TRUE. If all the conditions fail, the OR operator simply returns FALSE.<\/p>\n<p><strong><em>In some programming languages OR operator is denoted by the \u201c||\u201d symbol.<\/em><\/strong><\/p>\n<p><del>Real-Life Example<\/del><strong>: <\/strong>We should carry an umbrella when either it is sunny, or it is raining. Otherwise, we should not carry it. Like the previous example, if we want to derive the logical operation from this scenario, we have the following conditions:<\/p>\n<ul>\n<li><strong>Condition 1<\/strong>: Is it sunny outside?<\/li>\n<li><strong>Condition 2<\/strong>: Is it raining outside?<\/li>\n<li><strong>Decision<\/strong>: Should we carry an umbrella?<\/li>\n<\/ul>\n<table width=\"100%\">\n<tbody>\n<tr>\n<td width=\"36%\"><strong><em>Is sunny?<\/em><\/strong><\/td>\n<td width=\"29%\"><strong><em>Is raining?<\/em><\/strong><\/td>\n<td width=\"33%\"><strong><em>Carry umbrella?<\/em><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"36%\">YES<\/td>\n<td width=\"29%\">YES<\/td>\n<td width=\"33%\">YES<\/td>\n<\/tr>\n<tr>\n<td width=\"36%\">NO<\/td>\n<td width=\"29%\">YES<\/td>\n<td width=\"33%\">YES<\/td>\n<\/tr>\n<tr>\n<td width=\"36%\">YES<\/td>\n<td width=\"29%\">NO<\/td>\n<td width=\"33%\">YES<\/td>\n<\/tr>\n<tr>\n<td width=\"36%\">NO<\/td>\n<td width=\"29%\">NO<\/td>\n<td width=\"33%\">NO<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The\u00a0<strong>() or ()<\/strong>\u00a0(logical OR) block is an <del>Operators<\/del> block and a <strong>Boolean<\/strong> block. The block joins two Boolean blocks and compares them. If at least one of them is true, the block returns\u00a0<em>true<\/em>; if neither of them is true,\u00a0only then\u00a0does the block return\u00a0<em>false<\/em>. This block is used for checking if any of the conditions are true.<img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1537 aligncenter\" src=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/7-1.png\" alt=\"\" width=\"162\" height=\"57\" \/><\/p>\n<h3>Challenge<\/h3>\n<p>Make a code that basically detects whether any of the buttons of Quarky are pressed or not. <strong>If any of the buttons is pressed then the display of Quarky will show green, otherwise red.<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2051\" src=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/OR.gif\" alt=\"\" width=\"600\" height=\"338\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1539 size-full\" src=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/8-1.png\" alt=\"\" width=\"634\" height=\"335\" srcset=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/8-1.png 634w, https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/8-1-300x159.png 300w, https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/8-1-624x330.png 624w\" sizes=\"(max-width: 634px) 100vw, 634px\" \/><\/p>\n<h2>Logical Operators &#8211; NOT Operator<\/h2>\n<p>We use the NOT operator to reverse or negate a condition. If the condition is true, NOT will return false and vice versa. In some programming languages NOT, the operator is denoted by the \u201c!\u201d symbol.<\/p>\n<p><del>Real-Life Example<\/del><strong>: <\/strong>For example, you can go to play only if it is not raining, otherwise, you must stay indoors. Unlike the previous examples, here we have only one condition.<\/p>\n<ul>\n<li><strong>Condition<\/strong>: Is it raining?<\/li>\n<li><strong>Decision<\/strong>: Should we go out to play?<\/li>\n<\/ul>\n<table width=\"43%\">\n<tbody>\n<tr>\n<td width=\"49%\"><strong><em>Is it raining?<\/em><\/strong><\/td>\n<td width=\"50%\"><strong><em>Go out to play?<\/em><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"49%\">YES<\/td>\n<td width=\"50%\">NO<\/td>\n<\/tr>\n<tr>\n<td width=\"49%\">NO<\/td>\n<td width=\"50%\">YES<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The <strong>not ()<\/strong>\u00a0(logical NOT) block is an <del>Operators<\/del> block and a <strong>Boolean<\/strong> block. The block checks if the Boolean block inside it is false. If it is false, the block returns\u00a0<em>true<\/em>; if the condition is true, it returns\u00a0<em>false<\/em>. This block can be used to \u201creverse\u201d Booleans.<img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1544 aligncenter\" src=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/9.png\" alt=\"\" width=\"123\" height=\"53\" \/><\/p>\n<h3>Challenge<\/h3>\n<p>Make a code that basically detects whether the left button of Quarky is pressed or not.\u00a0<strong>If any of the buttons is pressed then the display of Quarky will show red, otherwise green.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2053\" src=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/NOT.gif\" alt=\"\" width=\"600\" height=\"338\" \/><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1546 size-full\" src=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/10-1.png\" alt=\"\" width=\"415\" height=\"341\" srcset=\"https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/10-1.png 415w, https:\/\/stemlab.org.in\/wp-content\/uploads\/2023\/03\/10-1-300x247.png 300w\" sizes=\"(max-width: 415px) 100vw, 415px\" \/><\/strong><\/p>\n<p>Make sure you finish and submit the <strong>assignment<\/strong>, as well as take the\u00a0<strong>quiz<\/strong>,\u00a0<em>before moving on to the next lesson<\/em>.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this lesson, you will learn about Conditional Statements and Relational Operators to create programs that can make decisions based on conditions. We will also learn about Logical Operators.<\/p>\n","protected":false},"author":1,"featured_media":368,"menu_order":7,"template":"","meta":{"footnotes":""},"class_list":["post-2117","lesson","type-lesson","status-publish","has-post-thumbnail","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/stemlab.org.in\/hi\/wp-json\/wp\/v2\/lesson\/2117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stemlab.org.in\/hi\/wp-json\/wp\/v2\/lesson"}],"about":[{"href":"https:\/\/stemlab.org.in\/hi\/wp-json\/wp\/v2\/types\/lesson"}],"author":[{"embeddable":true,"href":"https:\/\/stemlab.org.in\/hi\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":2,"href":"https:\/\/stemlab.org.in\/hi\/wp-json\/wp\/v2\/lesson\/2117\/revisions"}],"predecessor-version":[{"id":2161,"href":"https:\/\/stemlab.org.in\/hi\/wp-json\/wp\/v2\/lesson\/2117\/revisions\/2161"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/stemlab.org.in\/hi\/wp-json\/wp\/v2\/media\/368"}],"wp:attachment":[{"href":"https:\/\/stemlab.org.in\/hi\/wp-json\/wp\/v2\/media?parent=2117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}