Factorial number python
jersde
- Posts
- 1
- Registration date
- Friday August 2, 2019
- Status
- Member
- Last seen
- August 2, 2019
-
Hello,
hi don't understand why this code doesn't give me the factorial number.
somma = 0
i = 1
num = getInteger("Inserisci un numero e ti dirò il fattoriale: ")
if num == 1:
print("Il fattoriale è 1 ")
else:
while i < num:
somma = i * num
print("Il risultato è: ", somma)
See more