Question: Anagram Program in Python An anagram is a type of word play, the result of rearranging the letters of a word or phrase to produce
Anagram Program in Python
An anagram is a type of word play, the result of rearranging the letters of a word or phrase to produce a new word or phrase, using all the original letters exactly once; e.g., orchestra = carthorse, A decimal point = I'm a dot in place.
Write a Python program that, when started 1) randomly picks a word w from given list of words, 2) randomly permutes w (thus creating an anagram of w), 3) presents the anagram to the user, and 4) enters an interactive loop in which the user is invited to guess the original word. It may be a good idea to work with (say) color words only. The interaction with the program may look like so:
>>> import anagram
Color word anagram: onwbr
Guess the color word! black
Guess the color word! brown
Correct!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
