-1
我運行此代碼:無輸出,當我運行我的代碼
def fact(i):
j = 1
while i >= 1:
j = i * j
i -= 1
i = input("input the number: ")
print (fact(i))
,看到這樣的輸出:
input the number: 6
None
爲什麼我的輸出None
?哪裏不對?
你爲什麼不能,甚至複製並粘貼* 「無」 *?你沒有結果,因爲*你沒有任何'返回'。* – jonrsharpe