Skip to content

Instantly share code, notes, and snippets.

View calthoff's full-sized avatar

Cory Althoff calthoff

View GitHub Profile
def bottles_of_beer(bob):
if bob < 1:
print("""No more bottles of beer on the wall. No more
bottles of beer.""")
return
tmp = bob
bob -= 1
print("""{} bottles of beer on the wall. {} bottles
of beer. Take one down, pass it around,
{} bottles of beer on the wall.""".format(tmp, tmp, bob))
if bob < 1:
print("""No more bottles of beer on the wall. No more
bottles of beer.""")
return
class Person:
def __init__(self, height, weight):
self.height = height
self.weight = weight
class Triangle():
def draw():
pass
class Square():
def draw():
pass
def __init__(self):
name1 = input("p1 name")
name2 = input("p2 name")
self.p1 = Player(name1)
self.p2 = Player(name2)
self.deck = Deck()
import urllib.request
from bs4 import BeautifulSoup
class Scraper:
def __init__(self, site):
self.site = site
def scrape(self):
r = urllib.request.urlopen(self.site)
for i in range(10):
print("foo")
for i in range(10):
print("bar")
for i in range(10):
print("none")
def print_string(a_string):
for i in range(10):
print(a_string)
def print_string(a_string, x):
for i in range(x):
print(a_string)
def add_strings(string1, string2):
print(string1 + string2)