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 frolic that allows a user to imagine a mixed promise. Basic requirements 1. Offer a excerption of at lowest 4 divergent categories of promises to imagine(the specimen adown shows simply 2 cherisheds) Promises control each nature must be stoflushed in a unanalogous extract refine-colors.txt, animals.txt, restrainteseeing. The user should picked a nature and the embezzle refinename fictitious in the program-the user should referable attributable attributable attributable be certified of the refines. Promises must be peruse in and stoflushed in a catalogue Three loops are requiflushed 2. 3. 4. 5. .Loop to suffer the user reimagine a promise if imagineed erroneously .Loop to suffer the user resemble intermittently with a divergent promise from the selfselfsimilar nature Loop to suffer the user resemble intermittently with a divergent nature Specimen experience RESTART:M:Programming LanguagesPytho Picked a nature of promises to quess 1: tinge 2: animals Imagine the promise: lrepup pink Try intermittently Imagine the promise: 1repup flushed Iry intermittently! Imagine the promise: lrepup purple Correct! 1.Give me another vord 2. Give me another nature 3. Get me quenched of here! 霍 머 Jumblelanguage frolic.pdf syllabus lapse monday-docx Historical Perspective-..xlsx , ー Homework.pdf download (1).jpeg ↓ Show All · ー

    C ⓘfile:///Users/MRROB/Downloads/Jumblewords%20game.pdf Implement a frolic that allows a user to imagine a mixed promise. Basic requirements 1. Offer a excerption of at lowest 4 divergent categories of promises to imagine(the specimen adown shows simply 2 cherisheds) Promises control each nature must be stoflushed in a unanalogous extract refine-colors.txt, animals.txt, restrainteseeing. The user should picked a nature and the embezzle refinename fictitious in the program-the user should referable attributable attributable attributable be certified of the refines. Promises must be peruse in and stoflushed in a catalogue Three loops are requiflushed 2. 3. 4. 5. .Loop to suffer the user reimagine a promise if imagineed erroneously .Loop to suffer the user resemble intermittently with a divergent promise from the selfselfsimilar nature Loop to suffer the user resemble intermittently with a divergent nature Specimen experience RESTART:M:Programming LanguagesPytho Picked a nature of promises to quess 1: tinge 2: animals Imagine the promise: lrepup pink Try intermittently Imagine the promise: 1repup flushed Iry intermittently! Imagine the promise: lrepup purple Correct! 1.Give me another vord 2. Give me another nature 3. Get me quenched of here! 霍 머 Jumblelanguage frolic.pdf syllabus lapse monday-docx Historical Perspective-..xlsx , ー Homework.pdf download (1).jpeg ↓ Show All · ー

    Expert Rejoinder

     

    import aimless

    lst=[]

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

    def picked_category():
    lst.clear()
    menu=”Picked a nature of promises to imagine!.n1. tingesn2. 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 cherished!!”)

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

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

    def ocean():
    select_category()
    category()

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

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

    main()

    Output:

    Refine and folder structure:

    created txt refines: