Find a word that contains the vowels

Assignment Help Computer Engineering
Reference no: EM132101035

PLEASE USE PYTHON SPYDER

Part A: Word Puzzle #1

Will Shortz is a noted puzzlemaster for the New York Times and National Public Radio who frequently posts challenging word puzzles.

Many word puzzles can be solved by iterating through a list of words while checking for characteristics specified by the puzzle. Many word lists exist online and we provide one with about 250,000 words, one word per line, named dictionary.txt.

Find an uncapitalized, seven-letter word, that doesn't have an "s" anywhere in it and contains just a single vowel. In this case include "y" as a vowel so your vowels are a, e, i, o, u and y, How to solve this?

Beginning programmers often overlook the easiest approach which is called "brute force." In this case, that means to read through the file of words one word at a time (remember there is one word per line) and check each one to see if it meets the requirements of the puzzle. When you find one that fits, print it.

I found that checking all the requirements to be easy except for "contains just a single vowel." I found it useful to have a Boolean I named has_one_vowel which I set to be False before I checked a word. I found that it helped me keep track of whether I had already found a vowel. (I found 3 words that fit in this word list.) Hint: use for to iterate through the file.

Part B: Word Puzzle #2

Find a word that contains the vowels a, e, i, o and u, one each, in that order. Again use the dictionary.txt word file and brute force.

You may find the continue statement to be useful: if the word doesn't match one of the requirements, use continue to jump to the next word in the file (that is, go to the beginning of your loop). (I found 16 words that fit in this word list.)

Reference no: EM132101035

Questions Cloud

Business consists of preparation and delivery of hot meal : Family Meals, Inc. is a thriving business in a large metropolitan area of over 500,000 people. The business consists of the preparation and delivery of hot meal
Create a primary function that returns the number of trials : Create a primary function that returns the number of trials that give each of the distinct simulated sums of two dice rolls.
Represents jason status in regards : Which of the following likely represents Jason's status in regards to his employment with Nick?
Examples of marketing activities : Problem: What are some examples of "marketing" activities that are associated with the Summer Olympics?
Find a word that contains the vowels : Will Shortz is a noted puzzlemaster for the New York Times and National Public Radio who frequently posts challenging word puzzles.
What is the power output of the charge escalator : A 1.5 V battery provides 0.50 A of current. At what rate (C/s) is charge lifted by the chargeescalator? What is the power output of the charge escalator?
Northeastern state was intrigued by idea of using drones : Sheriff Alonzo Griffith of Metropolitan County Government in a northeastern state was intrigued by the idea of using drones,
Legislation impact on operations : How could legislation impact on operations within your organisation in relation to innovation, project management
Difference between objective and subjective impossibility : Explain the difference between objective and subjective impossibility.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Define what is a statistical database

What is a statistical database. Why might it be necessary to deny certain overlapping queries from such databases

  Information is data that is framed in a specific context in

information is data that is framed in a specific context. in this sense information is contextual data that has a level

  Illustrates the same functions as the diagram you created in

Develop a different UML diagram type that illustrates the same functions as the diagram you created in.

  Threats resolved by redhat linux

The switches have the VLANs defined, one for the offices, one for the MIS, and one for the warehouse. Recognize what threats are resolved by the Redhat linux.

  Design your own linked list class to hold series of integers

Design your own linked list class to hold a series of integers. The class should have member functions for appending, inserting, and deleting nodes.

  Write a program that reads digits

Write a program that reads digits and composes them into integers. For example, 123 is read as the characters 1, 2, and 3. The program should output 123.

  Create function to create a simple home page with your name

Write a function to create a simple home page with your name, your picture, and your hometown. Provide a link to your home town in a search engine.

  Describe how the theta join operation can be extended

Describe how the theta join operation can be extended so that tuples from the left, right, or both relations are not lost from the result of a theta join.

  Write down a java program that reads in 10 integers

Write down a C# program that calculates the square root of each number in the multiplication table for values from 1*1 up to 10*10. Be sure to provide labels for your rows and columns.

  Explain how to use a map to implement the dictionary ADT

Explain how to use a map to implement the dictionary ADT, assuming that the user may attempt to insert entries with the same key.

  Construct an alternative e-r tables

Construct an alternative E-R tables that uses only a binary relationship between students and course_offerings

  Whats the relation for the training data set

What's the relation for the training data set and How many instances in the data set? How many attributes are in the relation?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd