subject

The script is to open a given file. The user is to be asked what the name of the file is. The script will then open the file for processing and when done, close that file. The script will produce an output file based on the name of the input file. The output file will have the same name as the input file except that it will begin with "Analysis-". This file will be opened and closed by the script.
The script is to process the file and calculate the following information and output the information to the file in the order presented here.
The script it to count the number of lines, the number of words, and the number of characters in the file and put this information out into the output file with appropriate labels for the reader to know what the numbers are. This information is to be echoed on the screen to the user.
You may find it easier to determine the number of words if you remove the punctuation, digits, and other non letter characters other than spaces before trying to count the words. Those items are not considered to be part of a word. Keep that in mind when referencing words in following instructions.
Count spaces, digits, punctuation and other non letter characters as characters though
The script is produce a list of all unique words in the file and the of times each word appears in the file. This list with frequency counts is to be put in the output file in alphabetical order and one word/frequency pair to a line. The format should be word (frequency count). Be sure there is a space between the word and the beginning parentheses. You will count words that appear only once. Due to the possible length of this list, you are not to echo this list to the screen, only place it in the output file.
The script is to produce a list of 2 word pairs found in the file that appear more than once. If a 2 word pair appears only once, it is not to be put into the output file. The format of the line in the output file should be the two word pair followed by the frequency count in parentheses as seen in the previous item involving unique words. This list is put out after the single word list. There is to be a heading to the list to let the user know that the information is changing and a blank line put in before the heading. This information is to be echoed on the screen to the user.
The last bit of information the script it to place into the output file is the total number of words, the average length of a word, the number of unique words, the average number of letters in the unique words, and the number of word pairs that have frequencies of 2 or more. Properly label each item of information output in this section as well as placing a blank line before the section and giving the section a heading. This information is to be echoed on the screen to the user.
It is fully conceivable that the average number of letters in a word (length of a word) for the over all document is different than the average number of letters in a word for the unique word list. This is because a word such as "the" might appear multiple times in the file. In the first calculation, each instance of the is counted. In the second calculation, the word "the" is only counted 1 time on the list.
The script is to use solid programming practices like comments, self documenting variable names (also known as meaningful variable names) and easy to read and neat code.
You are to place a comment block at the very top of the script containing your name, the semester, the due date of the exam, and the instructor's name each on separate lines.
The logic is built to examine the process incoming data for specific items of information. This may need to be done in specific order with multiple processing steps.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:30
1.the index finger on your right hand types the f r v 4 j u m 7 h y 6 n lo.9 j u 7 m g t 5 b 2.if you need to multiply 400, 2, and 1 ½, what would you type on the numeric keypad? 400*2*1.5 400/2*1.5 400/2/1.5 400*2*1½ 3.select all examples of proper keyboarding technique. rest your fingers gently on the home row or home keys. slouch in your chair. rest your palms on the keyboard. relax your fingers. keep your hands lower than your elbows.
Answers: 1
question
Computers and Technology, 22.06.2019 15:00
Which of the following has not been attributed at least in part to social media a. drug addiction b. depression c. kidnapping d. murder
Answers: 2
question
Computers and Technology, 22.06.2019 17:30
The forerunner to cell phones, pdas, and smartphones was
Answers: 1
question
Computers and Technology, 22.06.2019 17:40
Write a modular program (no classes yet, just from what you learned last year), that allows two players to play a game of tic-tac-toe. use a two-dimensional char array with 3 rows and 3 columns as the game board. each element of the array should be initialized with an asterisk (*). the program should display the initial board configuration and then start a loop that does the following: allow player 1 to select a location on the board for an x by entering a row and column number. then redisplay the board with an x replacing the * in the chosen location. if there is no winner yet and the board is not yet full, allow player 2 to select a location on the board for an o by entering a row and column number. then redisplay the board with an o replacing the * in the chosen location. the loop should continue until a player has won or a tie has occurred, then display a message indicating who won, or reporting that a tie occurred. player 1 wins when there are three xs in a row, a column, or a diagonal on the game board. player 2 wins when there are three ox in a row, a column, or a diagonal on the game board. a tie occurs when all of the locations on the board are full, but there is no winner. input validation: only allow legal moves to be entered. the row must be 1, 2, or 3. the column must be 1, 2 3. the (row, column) position entered must currently be empty (i.e., still have an asterisk in it).
Answers: 1
You know the right answer?
The script is to open a given file. The user is to be asked what the name of the file is. The script...
Questions
Questions on the website: 13722363