Skip to content

Instantly share code, notes, and snippets.

@JakenHerman
JakenHerman / ssm.coffee
Last active January 4, 2016 13:49
Solar System Model
#code written by Jaken Herman
#Mercury
#Venus
#Earth
#Mars
#Jupiter
#Saturn
#Uranus
#Neptune
@JakenHerman
JakenHerman / symmetryDesigner.coffee
Created January 26, 2014 08:34
Symmetry Designer
background 0, 0, 0
draw = ->
fill random(75, 225), random(25, 225), random(25, 225)
noStroke()
ellipse mouseX, mouseY, 9, 9
ellipse mouseY, mouseX, 9, 9
@JakenHerman
JakenHerman / Challenge_2.py
Created February 13, 2014 16:32
Phython Challenge 2 Source Code
from string import maketrans
str = "g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr " \
"ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj."
intab = "abcdefghijklmnopqrstuvwxyz"
outtab= "cdefghijklmnopqrstuvwxyzab"
trantab = maketrans(intab, outtab)
print str.translate(trantab)
@JakenHerman
JakenHerman / Challenge_3.py
Created February 13, 2014 16:32
Phython Challenege 3 Source Code
import urllib
filehandle = urllib.urlopen("http://www.pythonchallenge.com/pc/def/ocr.html")
for lines in filehandle.readlines():
print lines
filehandle.close()
@JakenHerman
JakenHerman / sum_double.py
Created February 13, 2014 17:06
Sum Double Problem in Coding Bat
__author__ = 'Jaken'
def sum_double(a, b):
sum = a+b
if a==b:
dub = sum*2
return dub
@JakenHerman
JakenHerman / diff21.py
Created February 13, 2014 17:06
diff21 problem in Coding Bat
__author__ = 'Jaken'
def diff21(n):
if n >= 21:
return (n-21)*2
else:
return 21-n
@JakenHerman
JakenHerman / hello_name.py
Created February 13, 2014 17:09
hello_name problem in Coding Bat
__author__ = 'Jaken'
def hello_name(name):
return "Hello " + name + "!"
@JakenHerman
JakenHerman / make_abba.py
Created February 13, 2014 17:10
make_abba in Coding Bat
__author__ = 'Jaken'
def make_abba(a, b):
return a+b+b+a
@JakenHerman
JakenHerman / make_tags.py
Created February 13, 2014 17:13
make_tags in Coding Bat
__author__ = 'Jaken'
def make_tags(tag, word):
return "<"+tag+">"+word+"</"+tag+">"
@JakenHerman
JakenHerman / cigar_party.py
Created February 13, 2014 17:23
cigar_party in Coding Bat
__author__ = 'Jaken'
def cigar_party(cigars, is_weekend):
if is_weekend and cigars >= 40:
return True
elif is_weekend and cigars < 40:
return False
elif not is_weekend and cigars < 40 and cigars > 60:
return False