This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #codecademy battleship game created 04/19/2014 python track | |
| from random import randint | |
| board = [] | |
| for x in range(5): | |
| board.append(["O"] * 5) | |
| def print_board(board): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pyg = 'ay' | |
| original = raw_input('Enter a word:') | |
| if len(original) > 0 and original.isalpha(): | |
| word = original.lower() | |
| first = word[0] | |
| new_word = word[1:] + first + pyg | |
| s = new_word | |
| print s |