def getFactorialit (n): if n < 0, return -1 else fact = 1 for i in range (1, n +1): fact *=i return fact print getFactorialit(10)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter