Jumble word game make using Python:-
import random def choose(): #word use for jumbling words=['computer','subscribe','Like','Follow','knowledge','youtube','facebook'] pick=random.choice(words) return pick def jumble(word): jumbled="".join(random.sample(word,len(word))) return jumbled def thank(p1name,p2name,pp1,pp2): print(p1name,'your score is:',pp1) print(p2name,'your score is:',pp2) def play(): p1name=input('player1, please Enter your name:') p2name=input('player2, please Enter your name:') pp1=0 pp2=0 turn=0 while(1): #computer Task picked_word=choose() #create Question qn=jumble(picked_word) print(qn) #player 1 if(turn%2==0): print(p1name,'your Turn') ans=input('What is on my mind:') if(ans==picked_word): pp1=pp1+1 print('Your score is:-',pp1) else: print('Better Luck Next Time!, I thought:-',picked_word) c=int(input('press 1 to Continue and 0 to quit the game:')) if(c==0): thank(p1name,p2name,pp1,pp2) break else: print("\n") print(p2name,'your Turn') ans=input('What is on my mind:') if(ans==picked_word): pp2=pp2+1 print('Your score is:-',pp2) else: print('Better Luck Next Time!, I thought:-',picked_word) c=int(input('press 1 to Continue and 0 to quit the game:')) if(c==0): thank(p1name,p2name,pp1,pp2) break turn=turn+1 play()