Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php on line 152

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1930

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1930

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1930

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1930

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1930

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1930

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1930

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1930
{"id":21997,"date":"2015-09-18T13:22:55","date_gmt":"2015-09-18T18:22:55","guid":{"rendered":"http:\/\/saldabal.wordpress.com\/?p=37"},"modified":"2015-09-18T13:22:55","modified_gmt":"2015-09-18T18:22:55","slug":"use-of-the-conditionals-if-and-elif","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101fall2015\/2015\/use-of-the-conditionals-if-and-elif\/","title":{"rendered":"Use of the conditionals \u201cIf\u201d and \u201cElif\u201d"},"content":{"rendered":"

There is something in math called Conditional expressions. They are expressi\u00f3n that can only be answered with YES or NOT. So the statements needed to declare one expression of this kind must be also special, they are called conditionals.<\/p>\n

So we must use this statement to value if our expression is True or False. For that purpose we’ll use the special word “If”<\/p>\n

“If” in python means the same as it does in the english language. So after typing “If” you must state the expression you want to evaluate, either to be TRUE, or FALSE.<\/p>\n

An example of this will be.<\/p>\n

x = 5<\/p>\n

if ( x == 5):<\/p>\n

print(‘True’)<\/p>\n

It is very important that at the end of our statement we put a colon (:) because this means that the block of code we write next to it (actually under it and with a space tab) will be part of what will be executed in case that our conditional turns out to be TRUE.<\/p>\n

In the previous example, the code i wrote translated to english will literally mean:<\/p>\n

set the value of x to 5<\/p>\n

if x is equal to 5, print ‘True’<\/p>\n

But what if our expression is valuated at False. That would mean that our block of code we wrote under the expression wont be executed. In this case we have two options, we can just let it like that or we can arrange a second conditional to say what we want the computer to execute in case that it (the second conditional) turns out TRUE. For this purpose we can use the special word: ELIF, this is kind of a combination of Else If.<\/p>\n

So let’s see an example.<\/p>\n

\"Correct<\/a>
Correct use of “if” and “elif”<\/figcaption><\/figure>\n

In this piece of code we can see how at first instance, the value of x is equal to 5. Then we tried to evaluate x, so we\u00b4re saying that if x is equal to 6, print in the screen ‘If’ but because we set the value at 5 this turns out to be false, so it wont print ‘If’<\/p>\n

Then we set an Elif, which is kind of “if the last ‘If’ statement doesn\u00b4t work, evaluate this to see if it’s true so you can run it.”<\/p>\n

The Elif says that if the value of x is equal to 5, print ‘Elif’.<\/p>\n

At the moment you run the program, it prints ‘Elif’ because the conditions of Elif is True.<\/p>\n

Thats how If and Elif works, you just have make sure you know where and when you want to evaluate<\/p>\n

\"\"<\/a> \"\"<\/p>\n","protected":false},"excerpt":{"rendered":"

There is something in math called Conditional expressions. They are expressión that can only be answered with YES or NOT. So the statements needed to declare one expression of this kind must be also special, they are called conditionals. So… Continue Reading →<\/a>\"\"<\/p>\n","protected":false},"author":202,"featured_media":21996,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3],"tags":[642,693,62],"class_list":["post-21997","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogs","category-syndicated","tag-masteries15","tag-masteries16","tag-masteries"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/21997","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/users\/202"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/comments?post=21997"}],"version-history":[{"count":2,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/21997\/revisions"}],"predecessor-version":[{"id":22225,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/21997\/revisions\/22225"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/media\/21996"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/media?parent=21997"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/categories?post=21997"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/tags?post=21997"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}