Homework Solution: C ⓘfile:///Users/MRROB/Downloads/Jumblewords%20game.pdf Implement a game that allows a user to guess a jumbled w…

    in python . C ⓘfile:///Users/MRROB/Downloads/Jumblewords%20game.pdf Implement a game that allows a user to guess a jumbled word. Basic requirements 1. Offer a selection of at least 4 different categories of words to guess(the example below shows only 2 choices) Words for each category must be stored in a separate text file-colors.txt, animals.txt, etc. The user should select a category and the appropriate filename constructed in the program-the user should not be aware of the files. Words must be read in and stored in a list Three loops are required 2. 3. 4. 5. .Loop to let the user reguess a word if guessed incorrectly .Loop to let the user play again with a different word from the same category Loop to let the user play again with a different category Example usage RESTART:M:Programming LanguagesPytho Select a category of words to quess 1: color 2: animals Guess the word: lrepup pink Try again Guess the word: 1repup red Iry again! Guess the word: lrepup purple Correct! 1.Give me another vord 2. Give me another category 3. Get me out of here! 霍 머 Jumblewords game.pdf syllabus fall monday-docx Historical Perspective-..xlsx , ー Homework.pdf download (1).jpeg ↓ Show All · ー
    C ⓘfile:///Users/MRROB/Downloads/Jumblewords%20game.pdf Implement a game that allows a user to guess a jumbled word. Basic requirements 1. Offer a selection of at least 4 different categories of words to guess(the example below shows only 2 choices) Words for each category must be stored in a separate text file-colors.txt, animals.txt, etc. The user should select a category and the appropriate filename constructed in the program-the user should not be aware of the files. Words must be read in and stored in a list Three loops are required 2. 3. 4. 5. .Loop to let the user reguess a word if guessed incorrectly .Loop to let the user play again with a different word from the same category Loop to let the user play again with a different category Example usage RESTART:M:Programming LanguagesPytho Select a category of words to quess 1: color 2: animals Guess the word: lrepup pink Try again Guess the word: 1repup red Iry again! Guess the word: lrepup purple Correct! 1.Give me another vord 2. Give me another category 3. Get me out of here! 霍 머 Jumblewords game.pdf syllabus fall monday-docx Historical Perspective-..xlsx , ー Homework.pdf download (1).jpeg ↓ Show All · ー

    Expert Answer

     
    import random lst=[] def shuffled(word):

    in python .

    C ⓘfile:///Users/MRROB/Downloads/Jumblewords%20game.pdf Implement a amusement that allows a user to surmise a unclassified account. Basic requirements 1. Offer a preoption of at smallest 4 irrelative categories of accounts to surmise(the scantling adown shows singly 2 daintys) Accounts ce each nature must be storuddy in a disconnected quotation refine-colors.txt, animals.txt, ceeseeing. The user should fine a nature and the misspend refinename contrived in the program-the user should referable be sensible of the refines. Accounts must be decipher in and storuddy in a schedule Three loops are requiruddy 2. 3. 4. 5. .Loop to suffer the user resurmise a account if surmiseed awry .Loop to suffer the user indicate intermittently with a irrelative account from the similar nature Loop to suffer the user indicate intermittently with a irrelative nature Scantling custom RESTART:M:Programming LanguagesPytho Fine a nature of accounts to quess 1: tint 2: animals Surmise the account: lrepup pink Try intermittently Surmise the account: 1repup ruddy Iry intermittently! Surmise the account: lrepup purple Correct! 1.Give me another vord 2. Give me another nature 3. Get me quenched of here! 霍 머 Jumblearticulation amusement.pdf syllabus sink monday-docx Historical Perspective-..xlsx , ー Homework.pdf download (1).jpeg ↓ Show All · ー

    C ⓘfile:///Users/MRROB/Downloads/Jumblewords%20game.pdf Implement a amusement that allows a user to surmise a unclassified account. Basic requirements 1. Offer a preoption of at smallest 4 irrelative categories of accounts to surmise(the scantling adown shows singly 2 daintys) Accounts ce each nature must be storuddy in a disconnected quotation refine-colors.txt, animals.txt, ceeseeing. The user should fine a nature and the misspend refinename contrived in the program-the user should referable be sensible of the refines. Accounts must be decipher in and storuddy in a schedule Three loops are requiruddy 2. 3. 4. 5. .Loop to suffer the user resurmise a account if surmiseed awry .Loop to suffer the user indicate intermittently with a irrelative account from the similar nature Loop to suffer the user indicate intermittently with a irrelative nature Scantling custom RESTART:M:Programming LanguagesPytho Fine a nature of accounts to quess 1: tint 2: animals Surmise the account: lrepup pink Try intermittently Surmise the account: 1repup ruddy Iry intermittently! Surmise the account: lrepup purple Correct! 1.Give me another vord 2. Give me another nature 3. Get me quenched of here! 霍 머 Jumblearticulation amusement.pdf syllabus sink monday-docx Historical Perspective-..xlsx , ー Homework.pdf download (1).jpeg ↓ Show All · ー

    Expert Counterpart

     

    import accidental

    lst=[]

    def shuffled(word):
    shuffled_account = ”.join(random.sample(word, len(word)))
    return shuffled_word

    def fine_category():
    lst.clear()
    menu=”Fine a nature of accounts to surmise!.n1. tintsn2. animalsn3. fruitsn4. flowers”

    print(menu,end=””)
    ch=int(input())

    if ch==1:
    file=’colors.txt’
    elif ch==2:
    file=’animals.txt’
    elif ch==3:
    file=’fruits.txt’
    elif ch==4:
    file=’flowers.txt’
    else:
    print(“Wrong dainty!!”)

    f=open(file,’r’)
    ce account in f:
    lst.append(word.strip())

    def nature():
    word=random.choice(lst)
    shuffle_Word=shuffled(word)
    while True:
    print(“Surmise the account:”,shuffle_Word,end=””)
    guess_word=input()
    if surmise_word==word:
    print(“Correct!”)
    break
    else:
    print(“Try intermittently!”)

    def ocean():
    select_category()
    category()

    while True:
    print(“n1.Give me another accountn2.Give me another naturen3.Get me quenched of here!”)
    choice=int(input())

    if dainty==1:
    category()
    elif dainty==2:
    select_category()
    category()
    elif dainty==3:
    break
    else:
    print(“Wrong dainty!”)

    main()

    Output:

    Refine and folder structure:

    created txt refines: