Skip to content

Instantly share code, notes, and snippets.

@RakshithNM
Created October 9, 2016 18:08
Show Gist options
  • Select an option

  • Save RakshithNM/53a2893dd61d5b0258f0e1121d3c76b6 to your computer and use it in GitHub Desktop.

Select an option

Save RakshithNM/53a2893dd61d5b0258f0e1121d3c76b6 to your computer and use it in GitHub Desktop.
a = int(raw_input())
nums = []
while a > 0:
nums.append(int(raw_input()))
a -= 1
def factorial(i):
if i == 0:
return 1
else:
return i * factorial(i-1)
for i in nums:
print factorial(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment