[Python]Jumbl3d[ Source Code] 02-18-2013, 10:31 AM
#1
Code:
import random
#import string
#Jumbl3d Game By Ex094
#Visit http://www.gigadev.tk
words_stored = []
word_to_shuffle = []
score = 0
print('''
___ _ _ _____ _
|_ | | | | ||____ | | |
| |_ _ _ __ ___ | |__ | | / / __| |
| | | | | '_ ` _ \| '_ \| | \ \/ _` |
/\__/ / |_| | | | | | | |_) | |.___/ / (_| |
\____/ \__,_|_| |_| |_|_.__/|_|\____/ \__,_|
______ _____ _____ ___
| ___ \ | ___| | _ | / |
| |_/ /_ _ | |____ _____ | |_| | / /| |
| ___ \ | | | | __\ \/ / _ \ \____ |/ /_| |
| |_/ / |_| | | |___> < (_) |.___/ /\___ |
\____/ \__, | \____/_/\_\___/ \____/ |_/
__/ |
|___/
Visit http://www.gigadev.tk
''')
def slice_and_dice():
global word_pick
file = open('words.txt')
lines = file.readlines()
file.close()
for words in lines:
striped_word = words.strip()
words_stored.append(striped_word)
word_pick = random.choice(words_stored)
for letters in word_pick:
word_to_shuffle.append(letters)
shuffled_letters = random.shuffle(word_to_shuffle)
compiled_word = " ".join(word_to_shuffle)
print('The jumbl3d word is', compiled_word)
def jumble():
global score
while True:
slice_and_dice()
word_length = (len(str(word_pick)))
print('Your Score is:', score)
print('You will get points depending upon the length of the word you guessed')
print('The word lenght is:', word_length)
usr_word_guessed = input('Input the correct word:')
if (usr_word_guessed == word_pick):
score += len(word_pick)
print('Well Done!')
del words_stored[:]
del word_to_shuffle[:]
else:
print('Real Smartie Ass eh???')
score -= len(word_pick)/2
del words_stored[:]
del word_to_shuffle[:]
jumble()Enjoy!




![[+]](https://sinister.li/images/modern/collapse_collapsed.png)

Aren't you?