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":6706,"date":"2015-02-26T07:58:34","date_gmt":"2015-02-26T13:58:34","guid":{"rendered":"http:\/\/kenscourses.com\/tc101winter2015\/?page_id=6706"},"modified":"2015-02-26T09:20:18","modified_gmt":"2015-02-26T15:20:18","slug":"wsq09-factorial-calculator","status":"publish","type":"page","link":"https:\/\/kenscourses.com\/tc101winter2015\/course-home-page-for-tc1017\/wsqs-tc1017\/wsq09-factorial-calculator\/","title":{"rendered":"WSQ09 – Factorial Calculator"},"content":{"rendered":"

What to Do<\/h2>\n
\"creative<\/a>

creative commons licensed (BY-SA) flickr photo by \u2593\u2592\u2591 TORLEY \u2591\u2592\u2593: http:\/\/flickr.com\/photos\/torley\/3505324528<\/p><\/div>\n

Create a program that asks the user for a non-negative integer (let’s call that number n) and display for them the value of n! (n factorial).<\/p>\n

After showing them the answer, ask them if they would like to try another number (with a simple y\/n response) and either ask again (for y) or quit the program and wish them a nice day (if they answered n).<\/p>\n

Details<\/h2>\n

For the Python group, resist the urge to call math.factorial(n). Yes that would solve the problem but what would we do if there was no math.factorial() and we had no internet to find someone’s solution?<\/p>\n

There are two basic approaches: a loop with an accumulator of the multiplication and a recursive solution. Choose one and implement that. Once that is done, try the other way.<\/p>\n

If you used a while loop for the solution with a loop, try structuring this with a for loop (or vice-versa).<\/p>\n

Advanced Mode<\/h2>\n

There are many additional features you can add. The most interesting one will probably be extending this for any size of number: BigInteger class.<\/a><\/p>\n

What to Submit<\/h2>\n

As usual, create a blog post explaining what you did, where you found resources (books, videos, web pages, friends) to help you solve this. Remember to put the tag WSQ09 on your post so our blog hub picks that up.<\/p>\n

You should include your code as a link to GitHub. You really should start using your GitHub repository now. If you need help on that, just ask Ken or your classmates.<\/p>\n

If you have not seen my video yet about the GUI tutorial for GitHub, go check that out: http:\/\/youtu.be\/YQmlksGFZWY<\/p>\n

And of course, leave any questions here as well as asking those questions on Twitter with the hashtag #TC1017 so we all see your question posted there.<\/p>\n","protected":false},"excerpt":{"rendered":"

What to Do Create a program that asks the user for a non-negative integer (let’s call that number n) and display for them the value of n! (n factorial). After showing them the answer, ask them if they would like … Continue reading →<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":6704,"parent":329,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"tags":[66],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/pages\/6706"}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/comments?post=6706"}],"version-history":[{"count":3,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/pages\/6706\/revisions"}],"predecessor-version":[{"id":6716,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/pages\/6706\/revisions\/6716"}],"up":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/pages\/329"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/media\/6704"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/media?parent=6706"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/tags?post=6706"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}