Question: Requirements: You are responsible for implementing several functions: 1 . generate _ rhyming _ lines ( ) 2 . generate _ 1 0 _ syllable

Requirements: You are responsible for implementing several functions: 1. generate_rhyming_lines()2. generate_10_syllable_lines()3. generate_metered_line()(Bonus: not required)4. generate_line()5. generate_poem() The first 3 functions in this list are meant to test your ability to construct lines that have a specific property: generate_rhyming_lines() For this function you must use the helper functions described above to generate 2 lines of randomly selected words. Each line must be composed of 5 words. The two lines must rhyme with each other. There are no other requirements. The function should return a list whose elements are the two random rhyming lines constructed by your code. generate_10_syllable_lines() For this function you must the use the helper functions described above to generate 2 lines of randomly selected words. Each line must be composed of 10 syllables total. There are no other requirements. In particular, there is no requirement regarding the number of words; however many words there are, the sum of their syllable counts must be 10 per line. The function should return a list whose elements are the two random 10 syllable lines constructed by your code. generate_metered_line()(Bonus: not required) For this function you must use the helper functions described above to generate 1 line of randomly selected words. The line must be composed of 10 syllables, and the rhythm of the line must match the following pattern of stress: "0101010101". This is the meter of Iambic Pentameter. The function should return the random line constructed by your code as a string. Your implementation of the last two functions will determine the structure and composition of the poems generated by your program. generate_line()- This function will determine, for each line, how many words or syllables it is composed of, what is the relation between words--is there a meter (a pattern of stresses) the line has to obey--whether the line has to rhyme with an earlier line. You impose these restrictions as you generate words for the line reject words that don't obey the rules. The output of generate_line() should be a string of randomly generated words chosen according to the criteria you decided upon for lines of your poem. generate_poem()- This function implements the rules about how lines are related to each other (enforced by your implementation of generate_line(), and how many lines your poem will contain. The output of generate_poem() should be a string of your randomly created poem. Advice: If you are looking to keep things simple, I would suggest you choose a style of poetry that is simple with few requirements. For example, one form of haiku are composed of three lines: the first line has five syllables, the second has seven syllables, and the third line has 5 syllables. There are no requirements concerning either rhyming or meter for this style. There may be other, similarly simple styles to choose from as well.

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!