Skip to content

Instantly share code, notes, and snippets.

@puneetraipuria
puneetraipuria / factorial.py
Created October 12, 2014 02:44
factorial#ccoderbyte
def Factorial(num):
if num == 0:
return 1
else:
return num * Factorial(num-1)
print Factorial(int(input()))
@puneetraipuria
puneetraipuria / revers.py
Created October 12, 2014 02:21
how to reverse string #coderbyte
def reverse_string(str):
return str[::-1]
print reverse_string(raw_input())
@puneetraipuria
puneetraipuria / script.py
Last active August 29, 2015 14:07
spider algorithm
#page spyder algorithms
import urlparse
import urllib
from bs4 import BeautifulSoup
url = "http://github.com"
urls = [url]
visited = [url]