{"id":7914,"date":"2022-03-21T08:38:05","date_gmt":"2022-03-21T07:38:05","guid":{"rendered":"https:\/\/www.smileandlearn.com\/programming-with-conditionals\/"},"modified":"2025-02-18T14:01:14","modified_gmt":"2025-02-18T13:01:14","slug":"programming-with-conditionals","status":"publish","type":"post","link":"https:\/\/www.smileandlearn.com\/en\/programming-with-conditionals\/","title":{"rendered":"Programming with conditionals"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Hello! Today we are going to end the series of blog posts about the <\/span><b>programming by blocks<\/b><span style=\"font-weight: 400;\">today we will discover the <\/span><b>conditional blocks<\/b><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Throughout the article we will be able to learn the properties of conditionals and the possibilities they bring to programming. To do so, we will use the &#8220;Conditionals&#8221; activity of our Smile and Learn educational platform.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><b>Smile and Learn educational platform<\/b><span style=\"font-weight: 400;\"> has more than 7,500 educational activities for students from 3 to 12 years of age. On our platform, children can learn in a dynamic way various contents related to the main educational subjects, either in the classroom or at home. We have curricular content as well as content focused on social and emotional development, in addition to family play activities.<\/span><br \/>\n<span style=\"font-weight: 400;\">If you want to try it, you can request a Smile and Learn demo for 30 days for free. <\/span><b>30 days free of charge and without obligation<\/b> <a href=\"https:\/\/payments.smileandlearn.com\/payments?l0kl3=es\"><br \/>\n<span style=\"font-weight: 400;\">here<\/span><br \/>\n<\/a><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Hello! Today we are going to end the series of blog posts about the <\/span><b>programming by blocks<\/b><span style=\"font-weight: 400;\">today we will discover the <\/span><b>conditional blocks<\/b><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Throughout the article we will be able to learn the properties of conditionals and the possibilities they bring to programming. To do so, we will use the &#8220;Conditionals&#8221; activity of our Smile and Learn educational platform.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><b>Smile and Learn educational platform<\/b><span style=\"font-weight: 400;\"> has more than 7,500 educational activities for students from 3 to 12 years of age. On our platform, children can learn in a dynamic way various contents related to the main educational subjects, either in the classroom or at home. We have curricular content as well as content focused on social and emotional development, in addition to family play activities.<\/span><br \/>\n<span style=\"font-weight: 400;\">If you want to try it, you can request a Smile and Learn demo for 30 days for free. <\/span><b>30 days free of charge and without obligation<\/b> <a href=\"https:\/\/www.smileandlearn.com\/en\/how-to-start-learning\/\"><br \/>\n<span style=\"font-weight: 400;\">here<\/span><br \/>\n<span style=\"font-weight: 400;\">.<\/span><br \/>\n<\/a><\/p>\n<p><b>WHAT IS PROGRAMMING<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Have you ever wondered how a computer works? <\/span><span style=\"font-weight: 400;\">We might think that it is an incomprehensible machine but, in reality, it has a very simple operation.<\/span><\/p>\n<p><b>Programming is the language of technology and machines, but it is a very special language because we teach it to them.<\/b><span style=\"font-weight: 400;\">but it is a very special language because we teach it to them. <\/span> <span style=\"font-weight: 400;\">Imagine you build a robot, assemble its parts and put it on the floor, but it doesn&#8217;t move. That robot needs us to teach it how to work, so we have to program it, that is, <\/span><b>give you orders or instructions<\/b><span style=\"font-weight: 400;\">. <\/span><span style=\"font-weight: 400;\">To understand it better, read on!<\/span><\/p>\n<p><b>CONDITIONAL BLOCKS<\/b><\/p>\n<p><span style=\"font-weight: 400;\">In the entry on<\/span><b> block programming<\/b><span style=\"font-weight: 400;\"> we learned that <\/span><b>each block contains a different command, condition or event. <\/b><span style=\"font-weight: 400;\">This brings us to a new type of block: <\/span><b>conditionals<\/b><span style=\"font-weight: 400;\">. This block allows us to <\/span><b>different actions depending on the variable we indicate.<\/b><span style=\"font-weight: 400;\"> that we indicate to it. <\/span><span style=\"font-weight: 400;\">There are different types of conditionals, but in our activity we will use the &#8220;<\/span><b>conditional if<\/b><span style=\"font-weight: 400;\">&#8220;which allows us to perform a given action depending on two variables. Specifically, our character will observe the zebra crossing before crossing, if there are cars he will stop and if there are no cars he will cross.<\/span><\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-37018\" src=\"http:\/\/www.smileandlearn.com\/wp-content\/uploads\/2022\/03\/captura1.png\" alt=\"\" width=\"746\" height=\"422\" \/><\/p>\n<p><b>CONDITIONAL ACTIVITY<\/b><\/p>\n<p><span style=\"font-weight: 400;\">To understand it better, see how to overcome the second level of our &#8220;Conditionals&#8221; activity. <\/span><span style=\"font-weight: 400;\">As you can see, when we create the conditionals we select what action our character will perform according to the situation. If we do not tell him what to do, our character will not be able to continue. We have programmed it to observe the environment and determine what the situation is: in our case it should see if there are cars on our crosswalk, and after that, it will wait for a command telling it what to do. <\/span><span style=\"font-weight: 400;\">That is why it is very important to program conditional blocks correctly, indicating the variable and the action.<\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-37027\" src=\"http:\/\/www.smileandlearn.com\/wp-content\/uploads\/2022\/03\/captura2.png\" alt=\"\" width=\"749\" height=\"424\" \/><\/p>\n<p><b>USEFULNESS FOR PROGRAMMING<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Conditional blocks allow us to create much more complex programming. Thanks to them we can adapt the machines more to our needs, since we can create as many variables as we want. <\/span><span style=\"font-weight: 400;\">Most machines operate under conditions, for example, most cell phones have a warning to take care of our hearing. When we press the volume up button, the phone increases the volume, but when we reach a condition, which would be to have the volume at level 8, it warns us that if we continue to increase the volume we can damage our health. <\/span><span style=\"font-weight: 400;\">Conditionals are very interesting programming blocks that allow us to achieve a lot of things, practice with them and you will end up becoming a professional programmer.<\/span><\/p>\n<p><b>WHAT ELSE CAN I LEARN?<\/b><\/p>\n<p><span style=\"font-weight: 400;\">If you enjoyed the &#8220;Conditionals&#8221; activity, you can continue your learning with the activities in our <\/span><b>activities on our platform<\/b><span style=\"font-weight: 400;\"> Smile and Learn. In particular, you will be able to practice everything you have learned in the posts on block programming. You will love them!<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Conditional programming for children  <\/p>\n","protected":false},"author":6,"featured_media":6951,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[57],"tags":[],"class_list":["post-7914","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sin-categorizar"],"_links":{"self":[{"href":"https:\/\/www.smileandlearn.com\/en\/wp-json\/wp\/v2\/posts\/7914","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.smileandlearn.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.smileandlearn.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.smileandlearn.com\/en\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.smileandlearn.com\/en\/wp-json\/wp\/v2\/comments?post=7914"}],"version-history":[{"count":0,"href":"https:\/\/www.smileandlearn.com\/en\/wp-json\/wp\/v2\/posts\/7914\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.smileandlearn.com\/en\/wp-json\/wp\/v2\/media\/6951"}],"wp:attachment":[{"href":"https:\/\/www.smileandlearn.com\/en\/wp-json\/wp\/v2\/media?parent=7914"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.smileandlearn.com\/en\/wp-json\/wp\/v2\/categories?post=7914"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.smileandlearn.com\/en\/wp-json\/wp\/v2\/tags?post=7914"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}