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 1831

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 1831

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 1831

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 1831

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 1831

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 1831

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 1831

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 1831
{"id":20778,"date":"2015-09-11T01:37:24","date_gmt":"2015-09-11T06:37:24","guid":{"rendered":"http:\/\/charliegdrummer.wordpress.com\/?p=54"},"modified":"2015-09-11T01:37:24","modified_gmt":"2015-09-11T06:37:24","slug":"the-basics-of-programing-if-elif-else-masteries-15-16-17","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101fall2015\/2015\/the-basics-of-programing-if-elif-else-masteries-15-16-17\/","title":{"rendered":"The basics of programing: if, elif, else Masteries 15, 16, 17"},"content":{"rendered":"

\"elifelse\"<\/a>s<\/p>\n

There is the code I made to put at work the conditionals. The program basicaly tells you if the number you typed is a float, an integer, a negative integer, or a negative float.<\/p>\n

So first you ask for the number<\/p>\n

x = input ( “Number” )<\/p>\n

easy, then here comes the conditional.<\/p>\n

if<\/span><\/h1>\n

if is called conditional, python will run everything “inside” the if, IF the condition inside the parenthesis is true<\/p>\n

So first I will ask python if the number the user gave me is a negative float; if it has a “-” and a “.”<\/p>\n

to do it, I store the point in a token name floatt, and the minus in a token named minus<\/p>\n

minus = “-” \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0floatt = “.”<\/p>\n

\"ifofelif\"<\/a><\/p>\n

So \u00a0 \u00a0<\/span><\/p>\n

if ( (floatt in x) and (minus in x)):<\/span>
\n\u00a0 \u00a0 \u00a0 print (“It is a negative float”)<\/span><\/p>\n

What you are typing is: IF<\/span> the point storaged in FLOATT<\/span> is inside the number stored in X<\/span>, AND<\/span> the minus storaged in MINUS<\/span> is inside the number stored in X<\/span>, then it is a negative float, and the program will say it to you.<\/p>\n

elif<\/span><\/h1>\n

\"elifs\"<\/a><\/p>\n

We already have the condition to a negatiuve float, but we don’t have he conditions of float or negative.<\/p>\n

But we can’t put another if because the program will run the first condition, then the second one, and so on, so a negative float is a negative and a float, that’s why elif is so useful.<\/p>\n

You can ask, if the IF conditions didn’t met, another condition with elif.<\/p>\n

So<\/p>\n

elif (floatt in x):<\/span>
\n\u00a0 \u00a0 \u00a0 \u00a0print \u00a0( “It is a float” )<\/span><\/p>\n

elif (minus in x):<\/span>
\n\u00a0 \u00a0 \u00a0 \u00a0print ( “It is a negative number”)<\/span><\/p>\n

You are asking only when\u00a0the first coindition don’t met if FLOATT \u00a0<\/span>is inside of X<\/span>, if not, then you ask if MINUS<\/span> is inside X<\/span>.<\/p>\n

else<\/span><\/h1>\n

\"else\"<\/a><\/p>\n

Finally, if none of the previus conditions were met, ELSE<\/span> finally gets into scene, then it is a integer,<\/p>\n

So<\/p>\n

else:<\/span>
\n\u00a0 \u00a0 \u00a0 print ( “It is an integer” )<\/span><\/p>\n

An that is pretty much all! You know how to use if, elif, else conditionals!<\/p>\n

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

s There is the code I made to put at work the conditionals. The program basicaly tells you if the number you typed is a float, an integer, a negative integer, or a negative float. So first you ask for… Continue Reading →<\/a>\"\"<\/p>\n","protected":false},"author":191,"featured_media":20774,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3],"tags":[113,114,116,45,39],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/20778"}],"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\/191"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/comments?post=20778"}],"version-history":[{"count":3,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/20778\/revisions"}],"predecessor-version":[{"id":21930,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/20778\/revisions\/21930"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/media\/20774"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/media?parent=20778"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/categories?post=20778"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/tags?post=20778"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}