Posts by Hélio Meira Lins • 121 points
1 post
-
2
votes2
answers3540
viewsA: Factor factor in python,
Well, there are several ways to solve your problem. Two very simple ways are using recursion and a simple loop: def fat1(n): if n <= 1: return 1 return n*fat1(n-1) def fat2(n): resultado = 1 for…