Mar-13-2018, 01:36 PM
Question:
Write a program which can compute the factorial of a given numbers.
The results should be printed in a comma-separated sequence on a single line.
my code:
Write a program which can compute the factorial of a given numbers.
The results should be printed in a comma-separated sequence on a single line.
my code:
numb = input("Please add a number: ") def numb_f(x): i = 1 suma = 1 while i < int(numb): suma = suma * (i+1) i = i + 1 print(numb_f(numb))the output is always "None". Don't know why, please advise.