【发布时间】:2020-01-28 21:33:37
【问题描述】:
例如 24,是一个阶乘,因为:
4 * 3 * 2 * 1 = 24
代码应将 24 作为输入,输出(见下文)是否为阶乘。
return "is a factorial."
else:
return "is not a factorial."
print("The number " + str(24) + " " + str(isFactorial(24)))
【问题讨论】:
-
到目前为止你有什么尝试?
标签: python python-3.x factorial