Question: it was a mistake. i will repost another one Write a Python program that Asks a user to enter the name of their text file.
it was a mistake. i will repost another one
Write a Python program that Asks a user to enter the name of their text file. The file will contain verbs (one per line). At some point, the word STOP will appear to signify the end of the first collection of verbs. More verbs will follow (one per line) and the word END will signify the end of that collection of verbs. Read the first collection of verbs from the text file (using Python's file functions and methods) until the word STOP is encountered. For each verb, the program should call a FUNCTION (makeThirdSingular) which accepts a string and returns a string that is the third person singular verb form in English for each entry. The main program should print the original verb followed by its third person singular form. Next, your program should continue reading the second collection of verbs until the word END is encountered. For each entry, call a FUNCTION (makePresentPart) which accepts a string and returns a string that is the present participle for that entry. The main program should print the original verb followed by its present participle form. Here are the rules for the function called makeThirdSingular. The third person singular verb form in English is distinguished by the suffix -s, which is added to the stem of the infinitive form: run rightarrow runs. A simple set of rules can be given as follows. Requirement: create additional functions to handle these cases. Make sure that you do not use any global variables within your functions. Here are the rules for the FUNCTION called makePresentParticiple. In English, the present participle is formed by adding the suffixing to the infinite form: go rightarrow going. A simple set of heuristic rules can be given as follows. Requirement: create additional functions to handle these situations. Do not use any global variables within your functions - pass everything that is needed into the function. Write a Python program that Asks a user to enter the name of their text file. The file will contain verbs (one per line). At some point, the word STOP will appear to signify the end of the first collection of verbs. More verbs will follow (one per line) and the word END will signify the end of that collection of verbs. Read the first collection of verbs from the text file (using Python's file functions and methods) until the word STOP is encountered. For each verb, the program should call a FUNCTION (makeThirdSingular) which accepts a string and returns a string that is the third person singular verb form in English for each entry. The main program should print the original verb followed by its third person singular form. Next, your program should continue reading the second collection of verbs until the word END is encountered. For each entry, call a FUNCTION (makePresentPart) which accepts a string and returns a string that is the present participle for that entry. The main program should print the original verb followed by its present participle form. Here are the rules for the function called makeThirdSingular. The third person singular verb form in English is distinguished by the suffix -s, which is added to the stem of the infinitive form: run rightarrow runs. A simple set of rules can be given as follows. Requirement: create additional functions to handle these cases. Make sure that you do not use any global variables within your functions. Here are the rules for the FUNCTION called makePresentParticiple. In English, the present participle is formed by adding the suffixing to the infinite form: go rightarrow going. A simple set of heuristic rules can be given as follows. Requirement: create additional functions to handle these situations. Do not use any global variables within your functions - pass everything that is needed into the functionStep by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
