Question: Create a program that allows users to enter a sentence in either past or present or tense and get back the other tense. They

Create a program that allows users to enter a sentence in either

Create a program that allows users to enter a sentence in either past or present or tense and get back the other tense. They should also include today for present tense and yesterday for past tense. For example, if a user enters: I eat today. They should get back: I ate yesterday. Make sure ALL the following inputs are accounted for (meaning if any of these inputs are used, the program is expected to work correctly): I eat today. -> I ate yesterday. I walk today. -> I walked yesterday. She flies today. ->She flew yesterday. He dances today. -> He danced yesterday. We cook today. > We cooked yesterday. They bake today. -> They baked yesterday. You speak today. > You spoke yesterday. It shakes today. -> It shook yesterday. He leaves today. -> He left yesterday. Additionally, if a verb follows the standard past tense rule (meaning it ends with -ed), it should also work for this program. For example, the verb brush in past tense is brushed and so if someone enters a sentence using this word, the program should work correctly even though it is not included in the list above. A verb like fall however does not end in -ed (the past tense would be fell) and so does not need to be accounted for in this program. Example run: Please enter a sentence or q to quit: She ate yesterday. Present tense is: She eats today. Please enter a sentence or q to quit: I walk today. Past tense is: I walked yesterday. Please enter a sentence or q to quit: q BYE!

Step by Step Solution

3.48 Rating (155 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres the Python code for the program def getoppositetensesentence list of irregular ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!