Login Register






[Python]Jumbl3d[ Source Code] filter_list
Author
Message
[Python]Jumbl3d[ Source Code] #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!
My Blog: http://www.procurity.wordpress.com
Donations: 1HLjiSbnWMpeQU46eUVCrYdbkrtduX7snG

Reply

RE: [Python]Jumbl3d[ Source Code] #2
Cool Game. Got something to learn from this.

Reply

RE: [Python]Jumbl3d[ Source Code] #3
I will test this bro Smile
You do much gaming Biggrin Aren't you?

Reply

RE: [Python]Jumbl3d[ Source Code] #4
(06-16-2013, 12:34 PM)MrGeek Wrote: I will test this bro Smile
You do much gaming Biggrin Aren't you?

Nah, Not much of a gamer but I do this for getting hands on the programming language that I learn Smile
My Blog: http://www.procurity.wordpress.com
Donations: 1HLjiSbnWMpeQU46eUVCrYdbkrtduX7snG

Reply

RE: [Python]Jumbl3d[ Source Code] #5
(06-17-2013, 07:20 AM)Ex094 Wrote:
(06-16-2013, 12:34 PM)MrGeek Wrote: I will test this bro Smile
You do much gaming Biggrin Aren't you?

Nah, Not much of a gamer but I do this for getting hands on the programming language that I learn Smile

That's nice work Smile Applying what we have learned.

Reply