[Tutor] Hi there,

Steven D'Aprano steve at pearwood.info
Sat Jan 2 10:47:38 EST 2016


On Sat, Jan 02, 2016 at 02:45:30PM +0200, yehudak . wrote:
> I'm trying to write a Python 3.5 program to find how many trailing zeros
> are in 100! (factorial of 100).
> I downloaded factorial from Math module, but all my efforts to solve the
> problem failed.
> 
> I know the mathematical way to solve it (resulting in 24), but I want a
> Python solution.

Here are the steps needed:

http://www.purplemath.com/modules/factzero.htm

Try writing some Python code for this, and if you have trouble, show us 
your code and we'll help. But you have to write it first -- we won't do 
your homework for you.



-- 
Steve


More information about the Tutor mailing list