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":6706,"date":"2015-02-26T07:58:34","date_gmt":"2015-02-26T13:58:34","guid":{"rendered":"http:\/\/kenscourses.com\/tc101fall2015\/?page_id=6706"},"modified":"2015-10-15T11:08:41","modified_gmt":"2015-10-15T16:08:41","slug":"wsq09-factorial-calculator","status":"publish","type":"page","link":"https:\/\/kenscourses.com\/tc101fall2015\/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

You probably want to watch this video if you are using BigInteger:<\/p>\n

\t