Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hello everyone i was wondering if anyone can help me with this. Down below are the instructions and the output of how its supposed to
Hello everyone i was wondering if anyone can help me with this. Down below are the instructions and the output of how its supposed to look.
Tasks: Frequency analysis is the study of the frequency of letters in a text, i.e., the number of occurrences of each letter. In this assignment you will create dynamic web pages to perform frequency analysis to a text document entered by the user You should create two files: hw2 freq form.html and hw2 freq process php. The file hw2 freq form.html includes an HTML form with a textarea. It collects a text document entered by the user. After the user submits the form, hw2 freq process.php processes the data as follows: 1) Display the text document that is entered by the user 2) Change lowercase letters to uppercase letters using the strtoupper function. 3) Define a function letterCount that accepts a string (text document) and a letter, finds and returns the number of times that the letter occurs in the string. You must write your own function and not use any pre-defined PHP functions except strlen function. 4) Call the letterCount function to find the number of times each uppercase alphabetic letter CA to "Z") occurs in the text. If a letter doesn't occur in the input text, then its count equals 0. 5) Find the total number of alphabetic letters in the input text. Special characters and punctuations are not counted. 6) Calculate the letter frequency by dividing each letter count by the total number of letters. The letter frequency is the percentage ratio of the number of times a letter occurs in the text to the total number of alphabetic letters in the text. 7) Display the frequency analysis results in an HTML table in alphabetic order, i.e. display 26 alphabetic letters, the letter count and letter frequency for each letter. Keep 2 decimal places for letter frequency Sample Output 1. hw2 form.html page launched BCS350 Assignment 2 Student Name Frequency Analysis Enter a text document 2. Results of hw2 freq process.php (partial): BCS350 Assignment 2-Student Name Frequency Analysis You enterecd The Super Bowl is the annual championship game of the National Football League (NFL). The game is the culmination of a regular season that begins in the late summer of the previous calendar year. Normally, Roman numerals are used to identify each game, rather than the year in which it is held. For example, Super BowlI was played on January 15, 1967, following the 1966 regular season. The sole exception to this naming convention tradition occurred with Super Bowl 50, which was played on February 7, 2016, following the 2015 regular season, and the following year, the nomenclature returned to Roman numerals for Super Bow! LI, following the 2016 regular season. The most recent Super Bowl was Super Bowl LIT,on February 4, 2018, following the 2017 regular season. The total letter count: 584 Frequency Analysis of Your Text etter 52 10 12 10 70 15 16 890% 1 71% 05% 1 71% 1199% 257% 5 65% Tasks: Frequency analysis is the study of the frequency of letters in a text, i.e., the number of occurrences of each letter. In this assignment you will create dynamic web pages to perform frequency analysis to a text document entered by the user You should create two files: hw2 freq form.html and hw2 freq process php. The file hw2 freq form.html includes an HTML form with a textarea. It collects a text document entered by the user. After the user submits the form, hw2 freq process.php processes the data as follows: 1) Display the text document that is entered by the user 2) Change lowercase letters to uppercase letters using the strtoupper function. 3) Define a function letterCount that accepts a string (text document) and a letter, finds and returns the number of times that the letter occurs in the string. You must write your own function and not use any pre-defined PHP functions except strlen function. 4) Call the letterCount function to find the number of times each uppercase alphabetic letter CA to "Z") occurs in the text. If a letter doesn't occur in the input text, then its count equals 0. 5) Find the total number of alphabetic letters in the input text. Special characters and punctuations are not counted. 6) Calculate the letter frequency by dividing each letter count by the total number of letters. The letter frequency is the percentage ratio of the number of times a letter occurs in the text to the total number of alphabetic letters in the text. 7) Display the frequency analysis results in an HTML table in alphabetic order, i.e. display 26 alphabetic letters, the letter count and letter frequency for each letter. Keep 2 decimal places for letter frequency Sample Output 1. hw2 form.html page launched BCS350 Assignment 2 Student Name Frequency Analysis Enter a text document 2. Results of hw2 freq process.php (partial): BCS350 Assignment 2-Student Name Frequency Analysis You enterecd The Super Bowl is the annual championship game of the National Football League (NFL). The game is the culmination of a regular season that begins in the late summer of the previous calendar year. Normally, Roman numerals are used to identify each game, rather than the year in which it is held. For example, Super BowlI was played on January 15, 1967, following the 1966 regular season. The sole exception to this naming convention tradition occurred with Super Bowl 50, which was played on February 7, 2016, following the 2015 regular season, and the following year, the nomenclature returned to Roman numerals for Super Bow! LI, following the 2016 regular season. The most recent Super Bowl was Super Bowl LIT,on February 4, 2018, following the 2017 regular season. The total letter count: 584 Frequency Analysis of Your Text etter 52 10 12 10 70 15 16 890% 1 71% 05% 1 71% 1199% 257% 5 65%Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started