Skip to content

Instantly share code, notes, and snippets.

@LevonHM
LevonHM / Cracklepop
Created March 26, 2017 20:10
cracklepop 100
for i in range(1,101):
if i % 3==0 and i % 5 == 0:
print("CracklePop")
elif i % 3 == 0:0
print ("Crackle")
elif i % 5 == 0:
print ("Pop")
else:
print(i)
@LevonHM
LevonHM / Battleship
Created March 26, 2017 20:10
A game of Battleship
def fill_board(board):
for x in range(0, 5):
board.append(["O"] * 5)
def print_board(board):
for row in board:
print " ".join(row)
def random_row(board):
return randint(0, len(board) - 1)