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":26347,"date":"2015-11-17T18:38:41","date_gmt":"2015-11-18T00:38:41","guid":{"rendered":"http:\/\/aureliemartinette.wordpress.com\/?p=198"},"modified":"2015-11-17T18:38:41","modified_gmt":"2015-11-18T00:38:41","slug":"wsq14-tc101","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101fall2015\/2015\/wsq14-tc101\/","title":{"rendered":"WSQ14 #TC101"},"content":{"rendered":"

Hi,<\/p>\n

The subject of this task is to display to the user an approximation of e.<\/p>\n

When a user give you a precision for example 2, you have to display e and to be sure that the two first numbers just after the coma are right.<\/p>\n

To check your result you can use the google approximation.<\/p>\n

I created two function:<\/p>\n

The first one « is_equal »\u00a0function is to respect this point of the subject:\u00a0You will want to use the infinite series to calculate the value, stopping when the accuracy is reached (previous and current calculation are the same at the specified accuracy).<\/p>\n

Be careful you use precision+1 because we want that the number is truncated \u00a0and the round function modify the result.<\/p>\n

The second function reproduced the wikipedia sum formula with factorial.<\/p>\n

Don’t forget to import the math module !<\/p>\n

I initialized in this way :<\/p>\n

e_previous = -1 -> we don’t care because the e_previous = 0 in the first iteration
\ne_current = 0 -> to respect the formula in the first iteration of the while loop
\ni = 0 -> to respect the formula 0! = 1 so e_current = 1 (the first value of the sum)<\/p>\n

Here is my code:<\/p>\n

https:\/\/github.com\/aureliemartinet\/TC101\/blob\/master\/wsq14.py<\/a><\/p>\n

Have a good day !<\/p>\n

 <\/p>\n

 <\/p>\n

 <\/p>\n

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

Hi, The subject of this task is to display to the user an approximation of e. When a user give you a precision for example 2, you have to display e and to be sure that the two first numbers just after the coma are right. To check your result you can use the google […]\"\"<\/p>\n","protected":false},"author":213,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3],"tags":[577],"class_list":["post-26347","post","type-post","status-publish","format-standard","hentry","category-blogs","category-syndicated","tag-non-classe"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/26347","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\/213"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/comments?post=26347"}],"version-history":[{"count":1,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/26347\/revisions"}],"predecessor-version":[{"id":26348,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/26347\/revisions\/26348"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/media?parent=26347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/categories?post=26347"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/tags?post=26347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}