Re: Iteration for Factorials
On Oct 22, 11:45 am, Ant <ant...@gmail.c omwrote:
Don't google for the definition... google for the answer!
import urllib
import re
urllib.URLopene r.version = "Mozilla/4.0"
def fact(x):
r = re.compile(r"%d ! = (\d+)" % x)
for line in urllib.urlopen( "http://www.google.cl/search?q=%d%%21 "
% x):
m = r.search(line)
if m:
return int(m.group(1))
--
Roberto Bonvallet
On Oct 22, 11:45 am, Ant <ant...@gmail.c omwrote:
Er, no. And neither is mine. You may want to google for the definition
of factorial!
of factorial!
import urllib
import re
urllib.URLopene r.version = "Mozilla/4.0"
def fact(x):
r = re.compile(r"%d ! = (\d+)" % x)
for line in urllib.urlopen( "http://www.google.cl/search?q=%d%%21 "
% x):
m = r.search(line)
if m:
return int(m.group(1))
--
Roberto Bonvallet
Comment