I have been able to adjust the program, based on the recommendations, here it is
# Word Jumble
#
# The computer picks a word in the IT world and then "jumbles" it
# The player has to guess the word
#
# Obasa Adegoke - 11/04/11(dd/mm/yy)
import random
#this function jumbles the word
def word_jumble(word):
"""takes a word as arguement and jumbles it"""
jumble = ''
while word:
position = random.randrange(len(word))
jumble += word[position]
word = word[:position] + word[position+1:]
return jumble
#this is a function that selects a sequence from a tuple
def picker(w):
"""selects a random word from a tuple"""
word = random.choice(w)
#this line returns the word in uppercase
return word.upper()
#this are the tuples contaning the words
terms = ('designing', 'programming', 'algorithm', 'debugging', 'coding')
company = ('microsoft', 'IBM', 'apple', 'intel', 'nokia', 'AMD', 'DELL')
company2 = ('cisco', 'acer', 'lenovo', 'compaq', 'toshiba', 'hp' )
social = ('facebook', 'myspace', 'youtube', 'blogger', 'wordpress' )
mail = ('gmail', 'yahoomail', 'hotmail', 'aol')
language = ('java', 'ruby', 'python', 'jython', 'HTML', 'perl', 'CSS' )
sub_systems = ('software', 'hardware')
inventor = ('gates', 'jobs', 'yang', 'torvalds', 'filo', 'zukerberg')
search_engines = ('google', 'excite', 'bing', 'vivisimo')
#the various tuples are stored as a single tuple
combine = terms + company + language + inventor + sub_systems + social
combine += company2 + mail + search_engines
#this function will prompt fo action to the taken after program execution
def decision():
"""prompts user for decision after program execution"""
decide = input('Are you sure you want to quit (Y/N)')
decide = decide.upper()
while decide not in ["Y", "N"]:
print('*'.center(40, '*').center(70))
print("It's either Y or N".center(70))
decide = input('Are you sure you want to quit (Y/N)')
#this is the function that runs the program
def run():
"""this function runs the program"""
#picks the word to be jumbled, jumbles it and outputs it
word = picker(combine)
#this line creates a hint for the user
hint = ("starts with %s, ends with %s" %(word[0], word[-1])).center(70)
jumble = word_jumble(word)
print()
print(jumble.center(70))
print()
#interaction with the user starts here
while True:
#this lines accepts input and makes sure it's uppercased
guess = (input('Your guess (Q to quit, G to give up)\n')).upper()
if guess in ('Q', 'G'):
print(("You couldn't guess that it was %s" %word).center(70)
if guess == 'G'
else "Too bad, you quit".center(70))
break
elif guess != word:
print(("Oops, try again").center(70))
print(hint)
else:
print(("You're right, it's %s" %word).center(70))
break
if guess == "Q":
decision()
print("Thank you" .center(70))
#contents are now being seen from here
#decorators
print('-'.center(40,'-').center(70))
#introducing the program
print('Word Jumble Game'.center(40,'*').center(70))
print('by adegoke obasa'.center(40,'*').center(70))
print('Instructions'.center(40).center(70))
print("A word in the IT world has been jumbled".center(40).center(70))
print("Guess the word". center(40).center(70))
print("To quit [Q], To give up [G]". center(40,'*').center(70))
print()
#the program actually starts to run here
run()
#decorators
print('-'.center(40,'-').center(70))
#year of production
print('word jumble v1.0'.center(70))
print("copyright 2011".center(70))
Thanks again, your reviews will be highly welcome.