On the Unix machines,there is a file /usr/dict/words that contains a list of English words,one per line.This file is used by spell-checking programs for example.
Write a python function which takes one argument,which is a word (as a string)and returns true if the word contains alternating vowels and consonants (i.e a consonant followed by a vowel followed by a consonant) Then write a short piece of code to read the above file and print out all the words like "banana" and "lever" but not words like "knock" and "print"
All 3 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.