{"id":38048,"date":"2016-10-17T10:26:45","date_gmt":"2016-10-17T15:26:45","guid":{"rendered":"http:\/\/edalitablog.wordpress.com\/?p=392"},"modified":"2016-10-17T10:26:45","modified_gmt":"2016-10-17T15:26:45","slug":"if-else-and-elif-python","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101fall2016\/syndicated\/if-else-and-elif-python\/","title":{"rendered":"If, else and elif Python"},"content":{"rendered":"<p class=\"syndicated-attribution\"><em> --Originally published at <a href=\"https:\/\/edalitablog.wordpress.com\/2016\/10\/17\/if-and-else-python\/\"><a href=\"https:\/\/edalitablog.wordpress.com\">Ed_Alita<\/a><\/a><\/em><br \/><\/p>\n<p>The core of a program is if and else because thaey give the flow to a program therefore in order to make a program you net to know how do if and else work.<\/p>\n<p>&nbsp;<\/p>\n<p><img class=\" size-full wp-image-397 alignleft\" src=\"https:\/\/edalitablog.files.wordpress.com\/2016\/10\/ifex3.gif?w=748\" alt=\"ifex3\"   \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><img id=\"gif\" class=\"a-gif\" src=\"https:\/\/media.giphy.com\/media\/1iLVlbhSDNCy6fII\/giphy.gif?w=1700\" alt=\"@SummerBreak chill flow summerbreak summer break\" width=\"289\" height=\"163\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>To put in python this is the rules to put it:<\/p>\n<p><img class=\"alignnone size-full wp-image-394\" src=\"https:\/\/edalitablog.files.wordpress.com\/2016\/10\/if.gif?w=748\" alt=\"if\"   \/><\/p>\n<p>It has three parts the comparator and then the action this is a if context.<\/p>\n<p>To do a else if comparation is the next one.<\/p>\n<p><img class=\"alignnone size-full wp-image-414\" src=\"https:\/\/edalitablog.files.wordpress.com\/2016\/10\/if2.gif?w=748\" alt=\"if2\"   \/><\/p>\n<p>The last part is the else if the compartor does not apply it goes directly to the else.<\/p>\n<p>If the condition is true:<\/p>\n<p><img class=\"alignnone size-full wp-image-395\" src=\"https:\/\/edalitablog.files.wordpress.com\/2016\/10\/ifex1.gif?w=748\" alt=\"ifex1\"   \/><\/p>\n<p>if the cpondition is false:<\/p>\n<p>Now you are a step futher in becoming a code master.<\/p>\n<h2><strong>Elif<\/strong><\/h2>\n<p>This operator is use to compare a variable to a lot of expressin if any of them is true you go to a default expression.<\/p>\n<p>Put the next cod eto invoque the elif:<\/p>\n<p><img class=\"alignnone size-full wp-image-424\" src=\"https:\/\/edalitablog.files.wordpress.com\/2016\/10\/elif.gif?w=748\" alt=\"elif\"   \/><\/p>\n<p>the result is the next one:<\/p>\n<p><img class=\"alignnone size-full wp-image-425\" src=\"https:\/\/edalitablog.files.wordpress.com\/2016\/10\/elifex.gif?w=748\" alt=\"elifex\"   \/><\/p>\n<div class=\"X5GY7E6BwbZdXQ_CMZ_hG\" style=\"width:248px;height:185px;\"><a class=\"AcG-a0pLEWQMHV4-b3WUb\" href=\"https:\/\/giphy.com\/gifs\/life-programmer-ukMiDlCmdv2og\"><img class=\"jOQ31oyCahmByl_HZ0hoR\" src=\"https:\/\/media1.giphy.com\/media\/ukMiDlCmdv2og\/200.gif#9\" width=\"248\" height=\"185\" \/><\/a><\/div>\n<p>&nbsp;<\/p>\n<p>The material seen here is in:<\/p>\n<p><a href=\"https:\/\/www.tutorialspoint.com\/python\/python_if_else.htm\" rel=\"nofollow\">https:\/\/www.tutorialspoint.com\/python\/python_if_else.htm<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p><br \/>  <a rel=\"nofollow\" href=\"http:\/\/feeds.wordpress.com\/1.0\/gocomments\/edalitablog.wordpress.com\/392\/\"><img alt=\"\" border=\"0\" src=\"http:\/\/feeds.wordpress.com\/1.0\/comments\/edalitablog.wordpress.com\/392\/\" \/><\/a> <img alt=\"\" border=\"0\" src=\"https:\/\/pixel.wp.com\/b.gif?host=edalitablog.wordpress.com&#038;blog=115122805&%23038;post=392&%23038;subd=edalitablog&%23038;ref=&%23038;feed=1\" width=\"1\" height=\"1\" \/>","protected":false},"excerpt":{"rendered":"<p>&#8211;Originally published at Ed_Alita The core of a program is if and else because thaey give the flow to a program therefore in order to make a program you net to know how do if and else work. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; To put in python this is the rules to put &hellip; <a href=\"https:\/\/kenscourses.com\/tc101fall2016\/syndicated\/if-else-and-elif-python\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">If, else and elif Python<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":397,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[78,24],"class_list":["post-38048","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogs","category-syndicated","tag-basic","tag-python"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/38048","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/comments?post=38048"}],"version-history":[{"count":1,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/38048\/revisions"}],"predecessor-version":[{"id":38049,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/38048\/revisions\/38049"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/media?parent=38048"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/categories?post=38048"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/tags?post=38048"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}