{"id":38044,"date":"2016-10-17T09:39:38","date_gmt":"2016-10-17T14:39:38","guid":{"rendered":"http:\/\/a01228858.wordpress.com\/?p=223"},"modified":"2016-10-17T09:39:38","modified_gmt":"2016-10-17T14:39:38","slug":"else-and-elif","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101fall2016\/syndicated\/else-and-elif\/","title":{"rendered":"Else and Elif"},"content":{"rendered":"<p class=\"syndicated-attribution\"><em> --Originally published at <a href=\"https:\/\/a01228858.wordpress.com\/2016\/10\/17\/else-and-elif\/\"><a href=\"https:\/\/a01228858.wordpress.com\">Py(t)hon<\/a><\/a><\/em><br \/><\/p>\n<p>Continuing with the course, we have the next step that is the else and elif statement. Let\u2019s start with else, in the else statement is where you are going to put the block of code that you want to execute if the conditional in the if statement turns out to be False or 0.<\/p>\n<p>Here is an example:<\/p>\n<p><img class=\"alignnone size-full wp-image-225\" src=\"https:\/\/a01228858.files.wordpress.com\/2016\/10\/else-1.png?w=1000\" alt=\"else-1\"   \/><\/p>\n<p>On the other hand, we have the elif expression, that allows you to check for multiples condition for True and as soon as one of then turns out to be True, run.<\/p>\n<p>Here is an example:<\/p>\n<p><img class=\"alignnone size-full wp-image-230\" src=\"https:\/\/a01228858.files.wordpress.com\/2016\/10\/elif-1.png?w=1000\" alt=\"elif-1\"   \/><\/p>\n<p>Here is a video, for the people than didn\u2019t understand me:<\/p>\n<div class=\"jetpack-video-wrapper\"><iframe class='youtube-player' type='text\/html' width='1000' height='593' src='https:\/\/www.youtube.com\/embed\/bk22K1m0890?version=3&#038;rel=1&%23038;fs=1&%23038;autohide=2&%23038;showsearch=0&%23038;showinfo=1&%23038;iv_load_policy=1&%23038;wmode=transparent' allowfullscreen='true' style='border:0;'><\/iframe><\/div>\n<p>#Tec#Python#Else#Elif#ISC#TC101#Pug<\/p><br \/>  <a rel=\"nofollow\" href=\"http:\/\/feeds.wordpress.com\/1.0\/gocomments\/a01228858.wordpress.com\/223\/\"><img alt=\"\" border=\"0\" src=\"http:\/\/feeds.wordpress.com\/1.0\/comments\/a01228858.wordpress.com\/223\/\" \/><\/a> <img alt=\"\" border=\"0\" src=\"https:\/\/pixel.wp.com\/b.gif?host=a01228858.wordpress.com&#038;blog=115152340&%23038;post=223&%23038;subd=a01228858&%23038;ref=&%23038;feed=1\" width=\"1\" height=\"1\" \/>","protected":false},"excerpt":{"rendered":"<p>&#8211;Originally published at Py(t)hon Continuing with the course, we have the next step that is the else and elif statement. Let\u2019s start with else, in the else statement is where you are going to put the block of code that you want to execute if the conditional in the if statement turns out to be &hellip; <a href=\"https:\/\/kenscourses.com\/tc101fall2016\/syndicated\/else-and-elif\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Else and Elif<\/span><\/a><\/p>\n","protected":false},"author":28,"featured_media":225,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[149,125,34,42,24,33,36],"class_list":["post-38044","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogs","category-syndicated","tag-elif","tag-else","tag-isc","tag-pug","tag-python","tag-tc101","tag-tec"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/38044","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\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/comments?post=38044"}],"version-history":[{"count":2,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/38044\/revisions"}],"predecessor-version":[{"id":38092,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/38044\/revisions\/38092"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/media?parent=38044"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/categories?post=38044"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/tags?post=38044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}