Question: In 1 9 3 9 Ernest Vincent Wright published a 5 0 , 0 0 0 word novel called Gadsby that does not contain the

In 1939 Ernest Vincent Wright published a 50,000 word novel called Gadsby that does not contain the letter e. Since e is the most common letter in English, thats not easy to do.
In fact, it is difficult to construct a solitary thought without using that most common symbol. It is slow going at first, but with caution and hours of training you can gradually gain facility.
All right, Ill stop now.
Write a function called has_no_e that returns True if the given word doesnt have the letter e in it.
Write a program that reads words.txt and prints only the words that have no e. Compute the percentage of words in the list that have no e.Complete part 1, the function.
TP9.3bis [15](forbidden_2.py) Part 2 "find a combination of 5 forbidden letters that excludes...", but write code to solve it, not an interactive program.
This will get you started: words = pd.read_csv('words.txt', header=None).squeeze().str.lower()
, and itertools.permutations will help, but note there are 7 million permutations (len(list(itertools.permutations(string.ascii_lowercase, 5))), so spend a bit of time thinking about how to make it run fast.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!