Python Lab Ex 8seeders: 0
leechers: 0
Python Lab Ex 8 (Size: 1010 bytes)
Description
L8.2 Exercises Exercise L8.E1 – given a string S of length N from a text file, develop a program to count the total number of words T, in S. Use file-handling mechanisms in the Python to access the files. Assume words to be delimited (separated) by a space, an exclamation mark, a question mark, a comma, a period, a semicolon or a colon. Further, you may assume that there may be only one delimiter between any two words in S. N, the number of characters in S (i.e., the length of S), will be at least 1 and at most 100. The input will be given in the text file problem.in and the output should be written to the text file problem.out. Contents of example files would be as follows: problem.in This is a test. problem.out Number of words: 4 Related Torrents
Sharing Widget |