Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101winter2015/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/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/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/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/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/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/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/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/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/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/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/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/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/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/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/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831
{"id":6014,"date":"2015-02-20T12:34:22","date_gmt":"2015-02-20T18:34:22","guid":{"rendered":"https:\/\/rohdzaimar.withknown.com\/2015\/sum-of-range"},"modified":"2015-02-20T12:34:22","modified_gmt":"2015-02-20T18:34:22","slug":"sum-of-range","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101winter2015\/2015\/sum-of-range\/","title":{"rendered":"Sum of range:"},"content":{"rendered":"
\n

For #WSQ07<\/a> of my #TC1017<\/a> course I programmed a very interesting program to understand the use of “for” loops, and to understand the increment operators and compound assignment operators:<\/p>\n

 <\/p>\n

The program sums every number in a range given by the user.<\/p>\n

 <\/p>\n

Lets say the user gave 1 as the first number and 10 as the second number. The program would do the following:<\/p>\n

 <\/p>\n

0+1+2+3+4+5+6+7+8+9+10=55<\/p>\n

 <\/p>\n

The program also compares the first and the last numbers and makes reacomodates the first below the last so that the range is correctly calculated.<\/p>\n

 <\/p>\n

I´ll post a picture of my code.<\/p>\n

\"\"<\/p>\n

 <\/p>\n

Here notice im using a “For” loop.<\/p>\n

First i assing “counter” the value of “first”. This only happens when the loop initializes. Then, For “Counter” is less or equal than “last”, counter is incremented by one. And if the conditional is true, the code inside the loop runs.<\/p>\n

 <\/p>\n

Sum += counter<\/p>\n

 <\/p>\n

Which can also be written as: Sum = Sum + counter.<\/p>\n

 <\/p>\n

When the conditional is no longer true, the program exits the loop and prints the value of “sum”.<\/p>\n

 <\/p>\n

here it is how it looks on the terminal.<\/p>\n

 <\/p>\n

\"\"<\/p>\n

Cheers.<\/p>\n

 <\/p>\n

#WSQ07<\/a><\/p>\n

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

For #WSQ07 of my #TC1017 course I programmed a very interesting program to understand the use of “for” loops, and to understand the increment operators and compound assignment operators: The program sums every number in a range given by t… Continue reading →<\/span><\/a><\/p>\n","protected":false},"author":81,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3,26],"tags":[40,169],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/6014"}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/users\/81"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/comments?post=6014"}],"version-history":[{"count":2,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/6014\/revisions"}],"predecessor-version":[{"id":7082,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/6014\/revisions\/7082"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/media?parent=6014"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/categories?post=6014"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/tags?post=6014"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}