To gain experience working with loops.
For this assignment, you will write a program that calculates the factorial of a number. The factorial of a number $x$, written as $x!$ is equal to the product of all positive numbers preceding $x$:
$x! = x \cdot (x - 1) \cdot (x - 2) ... \cdot 3 \cdot 2 \cdot 1$
The factorial of 0 is defined to be equal to 1.
Below is a table of factorial values so you can test your program:
When your program is finished, email the .py file to firstname.lastname@example.org. Please attach it as a file instead of copying it into the body of the message!
Copyright © 2018 Ian Finlayson | Licensed under a Creative Commons Attribution 4.0 International License.