Question: USING PYTHON 12- write a function named fileStats that takes two strings parameters,1-inFile the name of the input file and 2- outFile the name of
USING PYTHON 12- write a function named fileStats that takes two strings parameters,1-inFile the name of the input file and 2- outFile the name of the output file. The function should read and analyze the contents of an input file and writes the statistics it compiles to the output file. the statistics you should compute about the input file are: the numbers of characters, the numbers of words , the numbers of lines, the numbers of digits and the numbers of punctuaction marks.. Each statistics should be written in a separate line of the output file( hint : the string class contains constants named punctuation and digits).
13-Write a function named symmetry that takes a string text as a parameter and return a dictionary d. Every letter that is both the first and last letter of some word in text should b a key in d. for example if text contains the word 'shucks ' ,'s' shold be a key in d.The value of s in d is the numbers of words that both begins and ends with 's'. ( the parameter text contain only lower and upper case character and white spaces.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
