Mater Dei Python Code

Sunday, March 9, 2014

Battleship 4/19

board = list()

board = []

def createBoard():
#indent 1
for i in range(0,5):
#indent 2
board.append(["O"] * 5)
#indent 1
return board

def printBoard(x):
#indent 1
for i in range(0,len(board)):
#indent 2
print board[i]
#no indent
print board
Posted by Ken Rhines at 10:47 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

About Me

Ken Rhines
View my complete profile

Blog Archive

  • ▼  2014 (92)
    • ►  February (42)
    • ▼  March (50)
      • Supermarket 3/13
      • Supermarket 4/13
      • Supermarket 6/13
      • Supermarket 7/13
      • Supermarket 8/13
      • Supermarket 9/13
      • Supermarket 10/13
      • Supermarket 11/13
      • Supermarket 12/13
      • Teacher 1/9
      • Teacher 2/9
      • Teacher 3/9
      • Teacher 4/9
      • Teacher 5/9
      • Teacher 6/9
      • Teacher 7/9
      • Teacher 8/9
      • Teacher 9/9
      • Lists 1/18
      • Lists 2/18
      • Lists 3/18
      • Lists 4/18
      • Lists 5/18
      • Lists 6/18
      • Lists 7/18
      • Lists 8/18
      • Lists 9/18
      • List 10/18
      • List 11/18
      • List 12/18
      • List 13/18
      • List 14/18
      • List 15/18
      • List 16/18
      • List 17/18
      • List 18/18
      • Battleship 3/19
      • Battleship 4/19
      • Battleship 5/19
      • Battleship 6/19
      • Battleship 7/19
      • Battleship 8/19
      • Battleship 9/19
      • Battleship 10/19
      • Battleship 11/19
      • Battleship 12/19
      • Battleship 13/19
      • Battleship 15/19
      • Battleship 16/19
      • Battleship 17/19
Simple theme. Powered by Blogger.