Limited-time offer! Save up to 50% Off | Solutions starting at $6 each  

Programming Assignment | Program Creation

Added on - 19 Sep 2019

Trusted by 2+ million users,
1000+ happy students everyday
Showing pages 1 to 2 of 4 pages
TCSS 142 Spring 2017, Programming Assignment 1Given the problem statement below, complete the followingProgram schedule chart (5 pts)Algorithm written in English / pseudocode (10 pts)Test plan (15 pts)Program that runs correctly (60 pts) –in order to receive credit, your code MUST runand complete at least some of the steps; comment out the code that shows yourattempt but does not work for possible partial creditCoding style and comments (10 points)meaningful identifiers, indentation, etc.header comment with your name and course info at the top of the filecomments explaining your codeExtra credit: algorithm as a flowchart OR code in methods (extra credit 10 pts)You are NOT allowed to help one another with this program or use somebody else's code –check the rules listed on the syllabus. However, you may seek help from TAs, CSS mentors, andinstructors.Problem Statement:For this assignment you are to create a program that analyzes a text file and producs thefollowing statistics:number of words – any sequence of alphanumeric characters (length >= 1) with thebeginning and ending non-alphanumeric character removed counts as a wordnumber of sentences – any sequence of words ending in a period, question mark,exclamation point, or semicolontext's vocabulary – all words of length 3 or more appearing in a file other thanthe,and; the vocabulary should not contain duplicate words regardless of theircapitalization (i.e. home and Home are considered to be the same word)lexical richness of the text – percentage of unique words in the text (ratio of vocab wordsto all words in the text)word length frequency information for words of any length: how many words of length 2,length 3, length 4, etc appear in the vocabulary.text Flesch index and the text grade level – explained belowthe concordance of the word entered by the user – explained belowYou should use strings and lists, as well as built-in string and list methods described in thetextbook, to solve this problems. However, you may not use other Python constructs that havenot been discussed in class so far. If in doubt, ask instructors for clarification.Flesch index and the grade levelThe Flesch/Flesch–Kincaid readability tests arereadability testsdesigned to indicatecomprehension difficulty when reading a passage of contemporary academic English. The indexis based on the average number of syllables per word and the average number of words persentence in a piece of text. Index scores usually range from 0 to 100, and are calculated using thefollowing formula:Definitions of terms such as word and sentence have been already provided above. As far assyllables are concerned, we will use the following rules:each vowel (aeiou) is considered a syllable unless it occurs in -es, -ed, or -e ending
any word of length 3 or less counts as one syllableThe grade level is calculated using the following formula:Note that the definitions of syllables, words, and sentence we are using are approximations of theactual syllables, words, and sentences in any natural language.ConcordanceA concordance is an alphabetical list of the principal words used in a book or body of work, withtheir immediatecontexts. For the purpose of this assignment, your program is to ask the user forone word only and produce all the lines in which the word appears in the original text, forexample, if the word nation is entered when processing the text of Gettysburg Address, it resultsin the following concordance phrases:continent a new nation, conceived in liberty and dedicated to thea great civil war, testing whether that nation or any nation solives that that nation might live. it is altogether fitting andnation under god shall have a new birth of freedom, and thatInputYour program is to perform text analysis of an input data file calledmytext.txt. In addition,your program needs to ask the user for the word for which the word concordance is to begenerated.OutputYour program is to generate two output files. The first file should be calledstats.txtandcontain all statistics listed above other than the vocabulary or concordance – sample provided onCanvas. The second file should be calleddictionary.csvand contain the text's vocabularylisted alphabetically in the first column – sample provided on Canvas. Concordance should beprinted to the screen (as shown above).FlowchartA flowchart is a graphical representation of an algorithm and two good examples are provided inthe textbook on p. 126 and p. 136. Note that the flowchart elements include a rectangle toindicate calculations, a diamond to indicate a decision point, and a parallelogram to indicateinput/output. In order to receive credit, you need to provide a detailed flowchart.Program SubmissionIf you want your assignment to be graded, it has to be compatible with our platform, namelyPython 3.4.1 The source code is to be called <yourNetid> withyour netid).On or before the due date, use the link posted inCanvasnext toProject 1to submit yourcode and all associated documentation. Make sure you know how to do that before the due datesince late assignments will not be accepted. Valid documentation file formats are: doc, docx, rtf,pdf.Program ScheduleDate Completed
You’re reading a preview
Preview Documents

To View Complete Document

Click the button to download
Subscribe to our plans

Download This Document