Here is my code, I had a little trouble using the BigIntegersLibrary, but Ken helped me and made everything easier.
https://github.com/marinaruelas/WSQ/blob/master/wsq09
This one was a little complicated because we can’t call math.factorial(n). So the best option was a loop with an accumulator. With ken’s help I was able to complete the task. Here’s the link of my code: https://github.com/JsphSalazar/WSQ-s/blob/master/WSQ09
This one was a little complicated because we can’t call math.factorial(n). So the best option was a loop with an accumulator. With ken’s help I was able to complete the task. Here’s the link of my code: https://github.com/JsphSalazar/WSQ-s/blob/master/WSQ09
#WSQ09 . This task was easy, it was all about using loops. At first, I couldn´t get it working all answers returned me 1 until I realized there was a missing “}”. When using loops, always be careful with the information you type inside of the ( ). I often use > instead of the other one which makes all the program stop working. I’ll link my code on github.
In this page you can see the program for the factorial calculator
https://github.com/dianagdv/TC101/blob/master/WSQ09
In this page you can see the program for the factorial calculator
https://github.com/dianagdv/TC101/blob/master/WSQ09
The code is not correct yet! You can find it here: https://repl.it/BTRP In this WSQ I wanted to try all three approaches: a while-loop, a for-loop and recursion. In the beginning I had some trouble with the recursion but then I looked up how it is done in c++ and adapted the idea to Python […]
The wsq08 is about to do a program that calculates the factorial number of a number given by the user, and then ask the user if he wants to calculate another factorial. A link to wth is a factorial So the code was pretty easy, … Continúa leyendo WSQ 09: Factorial
The wsq09 is about to do a program that calculates the factorial number of a number given by the user, and then ask the user if he wants to calculate another factorial. A link to wth is a factorial So the code was pretty easy, … Continúa leyendo WSQ 09: Factorial
Hi! This WSQ consisted of creating a program which returned the factorial of a given number. It seemed to be complicated since it required the use of iterations or repercusions. Once I started it, it turned out to be easier than I expected. First, I attepted to do it with a while loop and I had no trouble since it only required to reduce a counter and multiply the values. The tougher part was asking the user for if he wanted to obtain another factorial since I had no clue how to do that. Afterwards, I realized that another loop should be used taking all the code and, in this case, I used a character to receive the (y/n) answer, which was latter tested by a do while loop.
Here’s the code: https://github.com/CarlosGallegosT/Codes007/blob/master/Fatorial%20Calculator.cpp
So to make it more interesting, I attempted to do it with a for loop. I thought it would be pretty much the same as a while loop, but it required more parameters but the use was the same. In order to understand and apply it correctly, I used this source: http://www.tutorialspoint.com/cplusplus/cpp_for_loop.htm
Here’s the code: https://github.com/CarlosGallegosT/Codes007/blob/master/Factorial%20Calculator%202.cpp
Thanks for browsing! May the force be with you during partials. #WSQ09 #TC1017
An image of Factorial Art:
Image Source: http://chaosfissure.deviantart.com/art/Destined-439104625