How to factor a number?
n! or! n
Example:
Let's take x = 5
x = input('Digite um número inteiro: ')
i = 1
while i <= x:
for i in range(x):
i = i + 1
a = []
a.append(i)
print(a)
break
The result should be 120, however the interpreter prints this:
[1]
[2]
[3]
[4]
[5]
With 'append' I was able to print 'i' from 1 to 'x'. In the example above, 'i = 1' and 'x = 5'. What I can not do is multiply 'i' from 1 to 'x'!