You are viewing a single comment's thread. Return to all comments →
Python First way -
def extraLongFactorials(n): result = 1 for i in range(1, n): result = result * (i + 1) print(result)
Second way -
def extraLongFactorials(n): print(math.factorial(n))
Third way -
def extraLongFactorials(n): result = n for i in range(n-1, 0, -1): result = result * (i) print(result)
Seems like cookies are disabled on this browser, please enable them to open this website
Extra Long Factorials
You are viewing a single comment's thread. Return to all comments →
Python First way -
Second way -
Third way -