Skip to content

Instantly share code, notes, and snippets.

View cotarg's full-sized avatar
falling angel meets rising velociraptor: clever girl.

Chloe Cota cotarg

falling angel meets rising velociraptor: clever girl.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am cotarg on github.
  • I am cotarg (https://keybase.io/cotarg) on keybase.
  • I have a public key ASCQcP2UtoJzXvcZgxNDxKBUfWSyyAEK386V7WJn-dEpwQo

To claim this, I am signing this object:

# Write a fuction to draw a staircase using octothorpes (#). The function should accept one parameter (a fixnum)
# denoting how many steps to the staircase. Write a leading whitespace version and a left-justified version.
# staircase(4)
# #
# ##
# ###
# ####
def staircase(i)
@cotarg
cotarg / filledpolygon
Created December 3, 2014 20:43
Use turtle to draw filled polygons.
import turtle
wn = turtle.Screen()
sides_num = input("How many sides should this polygon have? ")
sides_num = int(sides_num)
poly_color = input("What color should the outline of this polygon be? ")
fill_color = input("What color should this polygon be filled in? ")
polly = turtle.Turtle()
@cotarg
cotarg / cracklepop
Last active August 29, 2015 14:05
Allows you to do a FizzBuzz (CracklePop) test on a specified range.
def cracklepop(n):
for i in range(1,n):
if i % 5 == 0 and i % 3 == 0: # number divisible by 5 and 3
print "CracklePop"
elif i % 5 == 0: # number divisible by 5
print "Pop"
elif i % 3 == 0: # number divisible by 3
print "Crackle"
else:
print i # prints the number