Posts by user125799 • 11 points
1 post
-
1
votes1
answer141
viewsQ: Why doesn’t this factor function work?
def fatorial(n): fat = 1 if n == 0 or n ==1: return 1 else: for i in range(1,n+1): fat=i*fat return fat def main(): n = int(input("Digite um numero que quer ver o fatorial: ")) print(str(n) + "! =…
pythonasked user125799 11