Question

In: Computer Science

two words that end in the same portion of letters but sound different are said to eye rhyme.

two words that end in the same portion of letters but sound different are said to eye rhyme. write a python program that prompts the user for an input and prints all the words that eye rhyme with the input, words with the same last three letters, use dictionary file

Solutions

Expert Solution

# taking user input

word = input("Enter a word: ")

# taking words from dict file

f = open("dict.txt").read().split()

# checking if there is a match

# printing if so

for one in f:

if word[-3:] == one[-3:]:

print(one)

'''

SAMPLE FILE USED

chord
cart
ford
art
mart
short
sword

OUTPUT

Enter a word: word

chord

ford

sword

Enter a word: art

cart

art

mart

'''


Related Solutions

1. The fact that a trumpet and a saxaphone sound different when playing the same fundamental...
1. The fact that a trumpet and a saxaphone sound different when playing the same fundamental frequency is best explained by which concept listed below? a. The Doppler Effect b. Sound wave reflection c. Beats d. Timbre 2. A single-frequency air horn (f = 800 Hz) is sounded by a rider in a roller coaster moving toward you at 47 m/s as you stand next to the track. What frequency do you hear? Assume the speed of sound to be...
Two sources emit sound with the same frequency. One source is at rest and the other...
Two sources emit sound with the same frequency. One source is at rest and the other is moving at a rate of 5 m / s toward the stationary observer. Observers hear kites 6 times per second. Determine the frequency of the sound emitted by the source.
1) How many different ways can you arrange the letters in the words a) “friends” b)...
1) How many different ways can you arrange the letters in the words a) “friends” b) “initial” c) “probability” Show your calculations.
Problem 6:   Two students are standing the same distance from a source of sound. The first...
Problem 6:   Two students are standing the same distance from a source of sound. The first student receives a power of 246 × 10-6 W in their eardrum. The second student receives σ = 1.17 times more power in their eardrum. Part (a) What is the ratio of the diameters of the student's eardrums? Part (b) If the second student's eardrum has a diameter of d = 1 cm what was the intensity of the sound that the student heard,...
Let us define the overlap between two words as the count ofunique letters they have...
Let us define the overlap between two words as the count of unique letters they have in common. Thus, the overlap between JANE and MICK is 0. Here are some more examples: - The overlap between JANE and MIKE is 1 (E is common) - The overlap between JANE and MEEK is 1 (E is common; we do not double count a letter) - The overlap between JANE and JEDI is 2 (J and E are common) - The overlap...
A monopolist sells the same product at the same price into two different markets. The demand...
A monopolist sells the same product at the same price into two different markets. The demand for the product in market #1 is denoted D1(p) = 30 – 2p where p is the unit price. The demand for the product in market #2 is given by D2(p) = 80 – 3p. Explain why the elasticity of total demand is not defined at a unit price of $15.
(numbers 20-21) Two speakers emit the same pure tone (sound of a single frequency) and are...
(numbers 20-21) Two speakers emit the same pure tone (sound of a single frequency) and are in phase. 20. An observer begins at the center point between the speakers and slowly moves toward one of the speakers. The second very quiet spot encountered (completely destructive interference) is 1.5 m from the center. What is the wavelength of the sound? a) 1.0 m b) 1.5 m c) 2.0 m d) 2.5 m e) 3.0 m 21. If the distance between the...
Problem 2: Two words are said to be anagrams if one can be formed by permuting...
Problem 2: Two words are said to be anagrams if one can be formed by permuting the letters of the other. For example: "pots", and "stop" are anagrams. An anagram chain is a list of words that are all anagrams to each other. The shortest anagram chain has length two. We are interested in calculating the length of the longest anagram chain in a given list of words. For example, the following nine words: rates, pots, tops, along, aster, stop,...
a. If you have two chromatograms of the same mixture, but they are from two different...
a. If you have two chromatograms of the same mixture, but they are from two different GC instruments, then how do you determine which one gives you better separation. For example, if the first one gives short, broad peaks and the 2nd one gives tall, sharp peaks then which instrument gives you better separation? Explain your answer. b. What is the retention time of peaks in the Gas Chromatograph tell you about the compound? For example, if you have a...
1.)Two sound waves with same frequency overlap. Crests overlap with crests. Troughs overlap with troughs. The...
1.)Two sound waves with same frequency overlap. Crests overlap with crests. Troughs overlap with troughs. The two sound waves are ( ) a.)In-phase b.)Out-of-phase c.)Out-of-synchronicity d.)In-synchronicity 2.)If you want to build a destructive interference between two sound waves, you will need to set up the phase of these two sound waves ( ) a.)In-phase by π b.)Largely different in frequency c.)Slightly different in frequency d.)Out-of-phase by π/2 3.)If two sound waves are constructive with each other, which statement is true...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT