I need to write a program in the Python language that reads multiple entries, and that, upon receipt of the "-1" entry, the program prints the factorials of their entry numbers.
Detail: I need to use the while
loop function, since it is part of the current subject I study. I'm writing this way:
while True:
n = int(raw_input())
if n >= 0:
continue
if n == -1:
break
numeroCalc = n
fatorial = 1
while numeroCalc > 0:
fatorial = fatorial * numeroCalc
numeroCalc = numeroCalc - 1
print fatorial
But it is not working.