[Solved] getting ZeroDivisionError: integer division or modulo by zero
Your factorial() function returns 0 for any input because of how you defined your range. The range builtin starts at 0 unless otherwise defined so: for c in range(n): re = re * c # no semicolons in Python is doing: re = re * 0 on the first iteration so for all subsequent iterations: … Read more