Preview:
n=int(input('enter number:'))
if n<0:
    print('enter positive number')
elif n==0:
    print(0,'!=',1)
else:
    factorial=1
    for i in range(1,n+1):
        factorial=factorial*i
    print(n,'!=',factorial)
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