Homework 5: Fun Word Counting Program

What is the main goal of Homework 5 assignment?

The main goal of the Homework 5 assignment is to create a program that reads text data from a file, counts the words in each line, verifies the count against a pre-counted number, and then writes these results into an output file. Is this sounds like a fun challenge to you?

The Main Goal of Homework 5 Assignment

The main goal of the Homework 5 assignment is to create a program that reads text data from a file, counts the words in each line, verifies the count against a pre-counted number, and then writes these results into an output file.

To achieve this goal, you will need to prompt the user to enter the name of the input file, check if the file exists, and ask for re-entry if needed. Your program should then prompt the user to enter the name of the output file, ensuring that any existing file with the same name is overwritten.

Once the input and output file names are obtained, your program will read the input file, evaluate the word count correctness for each student's hobby description, and write the results to the output file. The key is to use the split() function to separate words and the len() function to count the number of words accurately.

A successful completion of this assignment will earn you a maximum score of 100 out of 100, so make sure to pay attention to the details and have fun while coding!

← Posix portable operating system interface standards An enterprise s local repository for package updates →