Skip to content

Instantly share code, notes, and snippets.

@gdemir
Created March 4, 2011 09:53
Show Gist options
  • Select an option

  • Save gdemir/854414 to your computer and use it in GitHub Desktop.

Select an option

Save gdemir/854414 to your computer and use it in GitHub Desktop.
time.py
#!/usr/bin/python
#-*-coding:utf-8-*-
from time import *
def faktoriyel(n):
if n <=1:
return 1
else:
return n * faktoriyel(n - 1)
n = input("faktöriyeli hesaplanacak sayı?")
ilk = time()
sonuc = faktoriyel(n)
son = time()
print "%d! = %d | geçen süre = %f" % (n, sonuc, son - ilk)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment