Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''
- Created on Jan 15, 2018
- @author: Chris
- '''
- def main():
- """Ask user for word then calculate total size after
- word customization"""
- word = input('Enter a word to customize: ')
- print(word)
- print(len(word))
- length = 25 ** len(word)
- print('This will create ' ,length,' words.')
- answer = input('Do you want to continue? Y or N \n')
- """Selection statement. Yes to continue,
- no to stop program"""
- if answer.upper() == 'Y':
- print('Lets do this')
- """Get letter to change from word"""
- getLetter(word, index)
- print(letter,index)
- """Replace letter in word"""
- replacer(word, letter, index)
- else:
- print('Goodbye')
- def replacer(word, letter, index):
- print(word[:index] + letter + word[index:])
- def getLetter(letter, index):
- return(letter[index])
- if __name__ == '__main__':
- main()
Add Comment
Please, Sign In to add comment