Your Perfect Assignment is Just a Click Away

We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!


CMPSC 131 Haiku Generator Signboard Banging Python Lab Report

CMPSC 131 Haiku Generator Signboard Banging Python Lab Report

Question Description

I’m working on a computer science project and need support to help me study.

Project 3 – Haiku Generator


Haiku is a traditional Japanese poem form consisting of three lines where the first and last lines contain five syllables and the second line has seven syllables. The subject of the poem is often nature. Here is an example of haiku by Richard Wright:

Whitecaps on the bay

A broken signboard banging

In the April wind

Problem Definition

You are asked to design, implement, debug, document, and test a Python script that inputs words from text files and “randomly” generates a haiku which conforms to this format:

five syllables

seven syllables

five syllables

There are two input text files:

1) A file that contains five-syllable lines: fivesyll.txt

2) A file that contains seven-syllable lines: sevensyll.txt

Your script should read the lines from each file into two different lists and then randomly select a five syllable line, a seven syllable line, and a five syllable line to form a haiku and display on the screen. Some of the poems may be nonsensical, but all will be interesting!

Your script should allow the user to generate as many haikus as desired. It must also give the user the option of saving a poem to an output file.

Additional notes:

Use of functions in project 3 is required.

Required deliverables for Project 3 are the Python script (.py) and a sample output file containing at least two haikus generated by your program (.txt)

Extra credit: Write an original technology-themed haiku in 5-7-5 and submit with the rest of the project deliverables by April 30 at 11:59 p.m. If approved, you will earn five bonus points on Project 3.

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: Executive Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Executive Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Executive Papers is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Executive Papers, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.